pub enum NativeEventName {
Show 61 variants
Click,
DblClick,
MouseDown,
MouseUp,
MouseMove,
MouseEnter,
MouseLeave,
MouseOver,
MouseOut,
ContextMenu,
Input,
KeyDown,
KeyUp,
KeyPress,
Focus,
Blur,
FocusIn,
FocusOut,
Submit,
Change,
Drag,
DragStart,
DragEnd,
DragOver,
DragEnter,
DragLeave,
Drop,
TouchStart,
TouchEnd,
TouchMove,
TouchCancel,
Wheel,
Copy,
Cut,
Paste,
Play,
Pause,
Ended,
LoadedData,
CanPlay,
VolumeChange,
TimeUpdate,
HashChange,
PopState,
Resize,
Scroll,
Load,
Unload,
BeforeUnload,
Error,
Online,
Offline,
VisibilityChange,
AnimationStart,
AnimationEnd,
AnimationIteration,
TransitionStart,
TransitionEnd,
TransitionRun,
EuvSignalUpdate,
Other(String),
}Expand description
Represents the name of a DOM event.
Covers mouse, keyboard, focus, form, drag, touch, wheel, clipboard, and media events.
Variants§
Click
Mouse click event.
DblClick
Mouse double-click event.
MouseDown
Mouse down event.
MouseUp
Mouse up event.
MouseMove
Mouse move event.
MouseEnter
Mouse enter event.
MouseLeave
Mouse leave event.
MouseOver
Mouse over event.
MouseOut
Mouse out event.
ContextMenu
Context menu event.
Input
Input value change event.
KeyDown
Key down event.
KeyUp
Key up event.
KeyPress
Key press event.
Focus
Focus event.
Blur
Blur event.
FocusIn
Focus in event.
FocusOut
Focus out event.
Submit
Form submit event.
Change
Change event for select/checkbox/radio.
Drag
Drag event.
DragStart
Drag start event.
DragEnd
Drag end event.
DragOver
Drag over event.
DragEnter
Drag enter event.
DragLeave
Drag leave event.
Drop
Drop event.
TouchStart
Touch start event.
TouchEnd
Touch end event.
TouchMove
Touch move event.
TouchCancel
Touch cancel event.
Wheel
Wheel/scroll event.
Copy
Copy event.
Cut
Cut event.
Paste
Paste event.
Play
Play media event.
Pause
Pause media event.
Ended
Media ended event.
LoadedData
Media loaded data event.
CanPlay
Media can play event.
VolumeChange
Volume change event.
TimeUpdate
Time update event.
HashChange
Hash change event.
PopState
Pop state event.
Resize
Window resize event.
Scroll
Scroll event.
Load
Window load event.
Unload
Window unload event.
BeforeUnload
Window before unload event.
Error
Window error event.
Online
Window online event.
Offline
Window offline event.
VisibilityChange
Visibility change event.
AnimationStart
Animation start event.
AnimationEnd
Animation end event.
AnimationIteration
Animation iteration event.
TransitionStart
Transition start event.
TransitionEnd
Transition end event.
TransitionRun
Transition run event.
EuvSignalUpdate
Internal euv signal update event.
Other(String)
A custom event with an arbitrary name.
Trait Implementations§
Source§impl Clone for NativeEventName
impl Clone for NativeEventName
Source§fn clone(&self) -> NativeEventName
fn clone(&self) -> NativeEventName
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NativeEventName
impl Debug for NativeEventName
Source§impl Display for NativeEventName
Implements Display for NativeEventName to provide string representation.
impl Display for NativeEventName
Implements Display for NativeEventName to provide string representation.
This also provides ToString::to_string() via the standard blanket implementation,
which is the preferred way to obtain the event name as a String.
Source§impl FromStr for NativeEventName
Implements FromStr for NativeEventName, enabling parsing from Web-standard
lowercase event name strings (e.g., "click", "dblclick", "mouseenter").
impl FromStr for NativeEventName
Implements FromStr for NativeEventName, enabling parsing from Web-standard
lowercase event name strings (e.g., "click", "dblclick", "mouseenter").
This is the standard library trait for string-to-enum parsing, used by the
html! macro to convert event attribute keys (e.g., onclick) into the
corresponding NativeEventName variant at runtime.
§Supported names
All standard DOM event names in lowercase: click, dblclick, mousedown,
mouseup, mousemove, mouseenter, mouseleave, mouseover, mouseout,
contextmenu, input, keydown, keyup, keypress, focus, blur,
focusin, focusout, submit, change, drag, dragstart, dragend,
dragover, dragenter, dragleave, drop, touchstart, touchend,
touchmove, touchcancel, wheel, copy, cut, paste, play,
pause, ended, loadeddata, canplay, volumechange, timeupdate,
hashchange, popstate, resize, scroll, load, unload,
beforeunload, error, online, offline, visibilitychange,
animationstart, animationend, animationiteration, transitionstart,
transitionend, transitionrun.
Unknown names fall back to NativeEventName::Other(name).
Source§impl PartialEq for NativeEventName
impl PartialEq for NativeEventName
Source§fn eq(&self, other: &NativeEventName) -> bool
fn eq(&self, other: &NativeEventName) -> bool
self and other values to be equal, and is used by ==.