pub enum NativeEventName {
Show 60 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,
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.
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.
Implementations§
Source§impl NativeEventName
Maps each NativeEventName variant to its corresponding DOM event string.
impl NativeEventName
Maps each NativeEventName variant to its corresponding DOM event string.
Sourcepub fn as_str(&self) -> Cow<'static, str>
pub fn as_str(&self) -> Cow<'static, str>
Returns the string representation of this event name for DOM binding.
Static variants return Cow::Borrowed (zero allocation), while
Other variants return Cow::Owned (heap allocation).
§Returns
Cow<'static, str>- The event name as a static or owned string.