polish: tests and documentation
This commit is contained in:
1 parent
0896f34493
commit
da8159190b
27 files changed
+467
-569
No files matched your search
+79
-79
@@ -582,85 +582,85 @@ pub fn load_document() -> Document {
|
||||
|
||||
pub fn event_name_from_typ(typ: &str) -> &'static str {
|
||||
match typ {
|
||||
"copy" => "oncopy",
|
||||
"cut" => "oncut",
|
||||
"paste" => "onpaste",
|
||||
"compositionend" => "oncompositionend",
|
||||
"compositionstart" => "oncompositionstart",
|
||||
"compositionupdate" => "oncompositionupdate",
|
||||
"keydown" => "onkeydown",
|
||||
"keypress" => "onkeypress",
|
||||
"keyup" => "onkeyup",
|
||||
"focus" => "onfocus",
|
||||
"blur" => "onblur",
|
||||
"change" => "onchange",
|
||||
"input" => "oninput",
|
||||
"invalid" => "oninvalid",
|
||||
"reset" => "onreset",
|
||||
"submit" => "onsubmit",
|
||||
"click" => "onclick",
|
||||
"contextmenu" => "oncontextmenu",
|
||||
"doubleclick" => "ondoubleclick",
|
||||
"drag" => "ondrag",
|
||||
"dragend" => "ondragend",
|
||||
"dragenter" => "ondragenter",
|
||||
"dragexit" => "ondragexit",
|
||||
"dragleave" => "ondragleave",
|
||||
"dragover" => "ondragover",
|
||||
"dragstart" => "ondragstart",
|
||||
"drop" => "ondrop",
|
||||
"mousedown" => "onmousedown",
|
||||
"mouseenter" => "onmouseenter",
|
||||
"mouseleave" => "onmouseleave",
|
||||
"mousemove" => "onmousemove",
|
||||
"mouseout" => "onmouseout",
|
||||
"mouseover" => "onmouseover",
|
||||
"mouseup" => "onmouseup",
|
||||
"pointerdown" => "onpointerdown",
|
||||
"pointermove" => "onpointermove",
|
||||
"pointerup" => "onpointerup",
|
||||
"pointercancel" => "onpointercancel",
|
||||
"gotpointercapture" => "ongotpointercapture",
|
||||
"lostpointercapture" => "onlostpointercapture",
|
||||
"pointerenter" => "onpointerenter",
|
||||
"pointerleave" => "onpointerleave",
|
||||
"pointerover" => "onpointerover",
|
||||
"pointerout" => "onpointerout",
|
||||
"select" => "onselect",
|
||||
"touchcancel" => "ontouchcancel",
|
||||
"touchend" => "ontouchend",
|
||||
"touchmove" => "ontouchmove",
|
||||
"touchstart" => "ontouchstart",
|
||||
"scroll" => "onscroll",
|
||||
"wheel" => "onwheel",
|
||||
"animationstart" => "onanimationstart",
|
||||
"animationend" => "onanimationend",
|
||||
"animationiteration" => "onanimationiteration",
|
||||
"transitionend" => "ontransitionend",
|
||||
"abort" => "onabort",
|
||||
"canplay" => "oncanplay",
|
||||
"canplaythrough" => "oncanplaythrough",
|
||||
"durationchange" => "ondurationchange",
|
||||
"emptied" => "onemptied",
|
||||
"encrypted" => "onencrypted",
|
||||
"ended" => "onended",
|
||||
"error" => "onerror",
|
||||
"loadeddata" => "onloadeddata",
|
||||
"loadedmetadata" => "onloadedmetadata",
|
||||
"loadstart" => "onloadstart",
|
||||
"pause" => "onpause",
|
||||
"play" => "onplay",
|
||||
"playing" => "onplaying",
|
||||
"progress" => "onprogress",
|
||||
"ratechange" => "onratechange",
|
||||
"seeked" => "onseeked",
|
||||
"seeking" => "onseeking",
|
||||
"stalled" => "onstalled",
|
||||
"suspend" => "onsuspend",
|
||||
"timeupdate" => "ontimeupdate",
|
||||
"volumechange" => "onvolumechange",
|
||||
"waiting" => "onwaiting",
|
||||
"toggle" => "ontoggle",
|
||||
"copy" => "copy",
|
||||
"cut" => "cut",
|
||||
"paste" => "paste",
|
||||
"compositionend" => "compositionend",
|
||||
"compositionstart" => "compositionstart",
|
||||
"compositionupdate" => "compositionupdate",
|
||||
"keydown" => "keydown",
|
||||
"keypress" => "keypress",
|
||||
"keyup" => "keyup",
|
||||
"focus" => "focus",
|
||||
"blur" => "blur",
|
||||
"change" => "change",
|
||||
"input" => "input",
|
||||
"invalid" => "invalid",
|
||||
"reset" => "reset",
|
||||
"submit" => "submit",
|
||||
"click" => "click",
|
||||
"contextmenu" => "contextmenu",
|
||||
"doubleclick" => "doubleclick",
|
||||
"drag" => "drag",
|
||||
"dragend" => "dragend",
|
||||
"dragenter" => "dragenter",
|
||||
"dragexit" => "dragexit",
|
||||
"dragleave" => "dragleave",
|
||||
"dragover" => "dragover",
|
||||
"dragstart" => "dragstart",
|
||||
"drop" => "drop",
|
||||
"mousedown" => "mousedown",
|
||||
"mouseenter" => "mouseenter",
|
||||
"mouseleave" => "mouseleave",
|
||||
"mousemove" => "mousemove",
|
||||
"mouseout" => "mouseout",
|
||||
"mouseover" => "mouseover",
|
||||
"mouseup" => "mouseup",
|
||||
"pointerdown" => "pointerdown",
|
||||
"pointermove" => "pointermove",
|
||||
"pointerup" => "pointerup",
|
||||
"pointercancel" => "pointercancel",
|
||||
"gotpointercapture" => "gotpointercapture",
|
||||
"lostpointercapture" => "lostpointercapture",
|
||||
"pointerenter" => "pointerenter",
|
||||
"pointerleave" => "pointerleave",
|
||||
"pointerover" => "pointerover",
|
||||
"pointerout" => "pointerout",
|
||||
"select" => "select",
|
||||
"touchcancel" => "touchcancel",
|
||||
"touchend" => "touchend",
|
||||
"touchmove" => "touchmove",
|
||||
"touchstart" => "touchstart",
|
||||
"scroll" => "scroll",
|
||||
"wheel" => "wheel",
|
||||
"animationstart" => "animationstart",
|
||||
"animationend" => "animationend",
|
||||
"animationiteration" => "animationiteration",
|
||||
"transitionend" => "transitionend",
|
||||
"abort" => "abort",
|
||||
"canplay" => "canplay",
|
||||
"canplaythrough" => "canplaythrough",
|
||||
"durationchange" => "durationchange",
|
||||
"emptied" => "emptied",
|
||||
"encrypted" => "encrypted",
|
||||
"ended" => "ended",
|
||||
"error" => "error",
|
||||
"loadeddata" => "loadeddata",
|
||||
"loadedmetadata" => "loadedmetadata",
|
||||
"loadstart" => "loadstart",
|
||||
"pause" => "pause",
|
||||
"play" => "play",
|
||||
"playing" => "playing",
|
||||
"progress" => "progress",
|
||||
"ratechange" => "ratechange",
|
||||
"seeked" => "seeked",
|
||||
"seeking" => "seeking",
|
||||
"stalled" => "stalled",
|
||||
"suspend" => "suspend",
|
||||
"timeupdate" => "timeupdate",
|
||||
"volumechange" => "volumechange",
|
||||
"waiting" => "waiting",
|
||||
"toggle" => "toggle",
|
||||
_ => {
|
||||
panic!("unsupported event type")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user