Trait moxie_dom::interfaces::global_events::GlobalEventHandler [−][src]
pub trait GlobalEventHandler: HtmlElementBuilder + EventTarget<Abort> + EventTarget<Blur> + EventTarget<Cancel> + EventTarget<CanPlay> + EventTarget<CanPlayThrough> + EventTarget<Change> + EventTarget<Click> + EventTarget<CloseWebsocket> + EventTarget<ContextMenu> + EventTarget<CueChange> + EventTarget<DoubleClick> + EventTarget<Drag> + EventTarget<DragEnd> + EventTarget<DragEnter> + EventTarget<DragExit> + EventTarget<DragLeave> + EventTarget<DragOver> + EventTarget<DragStart> + EventTarget<Dropped> + EventTarget<DurationChange> + EventTarget<Emptied> + EventTarget<PlaybackEnded> + EventTarget<ErrorEvent> + EventTarget<Focus> + EventTarget<GotPointerCapture> + EventTarget<Input> + EventTarget<Invalid> + EventTarget<KeyDown> + EventTarget<KeyPress> + EventTarget<KeyUp> + EventTarget<ResourceLoad> + EventTarget<DataLoaded> + EventTarget<MetadataLoaded> + EventTarget<LoadEnd> + EventTarget<LoadStart> + EventTarget<LostPointerCapture> + EventTarget<MouseEnter> + EventTarget<MouseLeave> + EventTarget<MouseMove> + EventTarget<MouseOut> + EventTarget<MouseOver> + EventTarget<MouseUp> + EventTarget<Pause> + EventTarget<Play> + EventTarget<Playing> + EventTarget<PointerCancel> + EventTarget<PointerDown> + EventTarget<PointerEnter> + EventTarget<PointerLeave> + EventTarget<PointerMove> + EventTarget<PointerOut> + EventTarget<PointerOver> + EventTarget<PointerUp> + EventTarget<Progress> + EventTarget<PlaybackRateChange> + EventTarget<FormReset> + EventTarget<ViewResize> + EventTarget<Scroll> + EventTarget<Seeked> + EventTarget<Seeking> + EventTarget<Select> + EventTarget<SelectionChange> + EventTarget<SelectionStart> + EventTarget<ContextMenuShow> + EventTarget<Stalled> + EventTarget<Submit> + EventTarget<Suspend> + EventTarget<TimeUpdate> + EventTarget<VolumeChange> + EventTarget<Waiting> + EventTarget<Wheel> {
Show 71 methods
fn onabort(self, callback: impl FnMut(Abort) + 'static) -> Self { ... }
fn onblur(self, callback: impl FnMut(Blur) + 'static) -> Self { ... }
fn oncancel(self, callback: impl FnMut(Cancel) + 'static) -> Self { ... }
fn oncanplay(self, callback: impl FnMut(CanPlay) + 'static) -> Self { ... }
fn oncanplaythrough(
self,
callback: impl FnMut(CanPlayThrough) + 'static
) -> Self { ... }
fn onchange(self, callback: impl FnMut(Change) + 'static) -> Self { ... }
fn onclick(self, callback: impl FnMut(Click) + 'static) -> Self { ... }
fn onclose(self, callback: impl FnMut(CloseWebsocket) + 'static) -> Self { ... }
fn oncontextmenu(self, callback: impl FnMut(ContextMenu) + 'static) -> Self { ... }
fn oncuechange(self, callback: impl FnMut(CueChange) + 'static) -> Self { ... }
fn ondblclick(self, callback: impl FnMut(DoubleClick) + 'static) -> Self { ... }
fn ondrag(self, callback: impl FnMut(Drag) + 'static) -> Self { ... }
fn ondragend(self, callback: impl FnMut(DragEnd) + 'static) -> Self { ... }
fn ondragenter(self, callback: impl FnMut(DragEnter) + 'static) -> Self { ... }
fn ondragexit(self, callback: impl FnMut(DragExit) + 'static) -> Self { ... }
fn ondragleave(self, callback: impl FnMut(DragLeave) + 'static) -> Self { ... }
fn ondragover(self, callback: impl FnMut(DragOver) + 'static) -> Self { ... }
fn ondragstart(self, callback: impl FnMut(DragStart) + 'static) -> Self { ... }
fn ondrop(self, callback: impl FnMut(Dropped) + 'static) -> Self { ... }
fn ondurationchange(
self,
callback: impl FnMut(DurationChange) + 'static
) -> Self { ... }
fn onemptied(self, callback: impl FnMut(Emptied) + 'static) -> Self { ... }
fn onended(self, callback: impl FnMut(PlaybackEnded) + 'static) -> Self { ... }
fn onerror(self, callback: impl FnMut(ErrorEvent) + 'static) -> Self { ... }
fn onfocus(self, callback: impl FnMut(Focus) + 'static) -> Self { ... }
fn ongotpointercapture(
self,
callback: impl FnMut(GotPointerCapture) + 'static
) -> Self { ... }
fn oninput(self, callback: impl FnMut(Input) + 'static) -> Self { ... }
fn oninvalid(self, callback: impl FnMut(Invalid) + 'static) -> Self { ... }
fn onkeydown(self, callback: impl FnMut(KeyDown) + 'static) -> Self { ... }
fn onkeypress(self, callback: impl FnMut(KeyPress) + 'static) -> Self { ... }
fn onkeyup(self, callback: impl FnMut(KeyUp) + 'static) -> Self { ... }
fn onload(self, callback: impl FnMut(ResourceLoad) + 'static) -> Self { ... }
fn onloadeddata(self, callback: impl FnMut(DataLoaded) + 'static) -> Self { ... }
fn onloadedmetadata(
self,
callback: impl FnMut(MetadataLoaded) + 'static
) -> Self { ... }
fn onloadend(self, callback: impl FnMut(LoadEnd) + 'static) -> Self { ... }
fn onloadstart(self, callback: impl FnMut(LoadStart) + 'static) -> Self { ... }
fn onlostpointercapture(
self,
callback: impl FnMut(LostPointerCapture) + 'static
) -> Self { ... }
fn onmouseenter(self, callback: impl FnMut(MouseEnter) + 'static) -> Self { ... }
fn onmouseleave(self, callback: impl FnMut(MouseLeave) + 'static) -> Self { ... }
fn onmousemove(self, callback: impl FnMut(MouseMove) + 'static) -> Self { ... }
fn onmouseout(self, callback: impl FnMut(MouseOut) + 'static) -> Self { ... }
fn onmouseover(self, callback: impl FnMut(MouseOver) + 'static) -> Self { ... }
fn onmouseup(self, callback: impl FnMut(MouseUp) + 'static) -> Self { ... }
fn onpause(self, callback: impl FnMut(Pause) + 'static) -> Self { ... }
fn onplay(self, callback: impl FnMut(Play) + 'static) -> Self { ... }
fn onplaying(self, callback: impl FnMut(Playing) + 'static) -> Self { ... }
fn onpointercancel(
self,
callback: impl FnMut(PointerCancel) + 'static
) -> Self { ... }
fn onpointerdown(self, callback: impl FnMut(PointerDown) + 'static) -> Self { ... }
fn onpointerenter(
self,
callback: impl FnMut(PointerEnter) + 'static
) -> Self { ... }
fn onpointerleave(
self,
callback: impl FnMut(PointerLeave) + 'static
) -> Self { ... }
fn onpointermove(self, callback: impl FnMut(PointerMove) + 'static) -> Self { ... }
fn onpointerout(self, callback: impl FnMut(PointerOut) + 'static) -> Self { ... }
fn onpointerover(self, callback: impl FnMut(PointerOver) + 'static) -> Self { ... }
fn onpointerup(self, callback: impl FnMut(PointerUp) + 'static) -> Self { ... }
fn onprogress(self, callback: impl FnMut(Progress) + 'static) -> Self { ... }
fn onratechange(
self,
callback: impl FnMut(PlaybackRateChange) + 'static
) -> Self { ... }
fn onreset(self, callback: impl FnMut(FormReset) + 'static) -> Self { ... }
fn onresize(self, callback: impl FnMut(ViewResize) + 'static) -> Self { ... }
fn onscroll(self, callback: impl FnMut(Scroll) + 'static) -> Self { ... }
fn onseeked(self, callback: impl FnMut(Seeked) + 'static) -> Self { ... }
fn onseeking(self, callback: impl FnMut(Seeking) + 'static) -> Self { ... }
fn onselect(self, callback: impl FnMut(Select) + 'static) -> Self { ... }
fn onselectionchange(
self,
callback: impl FnMut(SelectionChange) + 'static
) -> Self { ... }
fn onselectstart(
self,
callback: impl FnMut(SelectionStart) + 'static
) -> Self { ... }
fn onshow(self, callback: impl FnMut(ContextMenuShow) + 'static) -> Self { ... }
fn onstalled(self, callback: impl FnMut(Stalled) + 'static) -> Self { ... }
fn onsubmit(self, callback: impl FnMut(Submit) + 'static) -> Self { ... }
fn onsuspend(self, callback: impl FnMut(Suspend) + 'static) -> Self { ... }
fn ontimeupdate(self, callback: impl FnMut(TimeUpdate) + 'static) -> Self { ... }
fn onvolumechange(
self,
callback: impl FnMut(VolumeChange) + 'static
) -> Self { ... }
fn onwaiting(self, callback: impl FnMut(Waiting) + 'static) -> Self { ... }
fn onwheel(self, callback: impl FnMut(Wheel) + 'static) -> Self { ... }
}
Expand description
These event handlers are defined on the GlobalEventHandlers mixin, and implemented by HTMLElement, Document, Window, as well as by WorkerGlobalScope for Web Workers.
Provided methods
fn oncanplaythrough(
self,
callback: impl FnMut(CanPlayThrough) + 'static
) -> Self
fn oncanplaythrough(
self,
callback: impl FnMut(CanPlayThrough) + 'static
) -> Self
Set an event handler.
fn onclose(self, callback: impl FnMut(CloseWebsocket) + 'static) -> Self
fn onclose(self, callback: impl FnMut(CloseWebsocket) + 'static) -> Self
Set an event handler.
Set an event handler.
fn oncuechange(self, callback: impl FnMut(CueChange) + 'static) -> Self
fn oncuechange(self, callback: impl FnMut(CueChange) + 'static) -> Self
Set an event handler.
fn ondblclick(self, callback: impl FnMut(DoubleClick) + 'static) -> Self
fn ondblclick(self, callback: impl FnMut(DoubleClick) + 'static) -> Self
Set an event handler.
fn ondragenter(self, callback: impl FnMut(DragEnter) + 'static) -> Self
fn ondragenter(self, callback: impl FnMut(DragEnter) + 'static) -> Self
Set an event handler.
fn ondragexit(self, callback: impl FnMut(DragExit) + 'static) -> Self
fn ondragexit(self, callback: impl FnMut(DragExit) + 'static) -> Self
Set an event handler.
fn ondragleave(self, callback: impl FnMut(DragLeave) + 'static) -> Self
fn ondragleave(self, callback: impl FnMut(DragLeave) + 'static) -> Self
Set an event handler.
fn ondragover(self, callback: impl FnMut(DragOver) + 'static) -> Self
fn ondragover(self, callback: impl FnMut(DragOver) + 'static) -> Self
Set an event handler.
fn ondragstart(self, callback: impl FnMut(DragStart) + 'static) -> Self
fn ondragstart(self, callback: impl FnMut(DragStart) + 'static) -> Self
Set an event handler.
fn ondurationchange(
self,
callback: impl FnMut(DurationChange) + 'static
) -> Self
fn ondurationchange(
self,
callback: impl FnMut(DurationChange) + 'static
) -> Self
Set an event handler.
fn onended(self, callback: impl FnMut(PlaybackEnded) + 'static) -> Self
fn onended(self, callback: impl FnMut(PlaybackEnded) + 'static) -> Self
Set an event handler.
fn onerror(self, callback: impl FnMut(ErrorEvent) + 'static) -> Self
fn onerror(self, callback: impl FnMut(ErrorEvent) + 'static) -> Self
Set an event handler.
fn ongotpointercapture(
self,
callback: impl FnMut(GotPointerCapture) + 'static
) -> Self
fn ongotpointercapture(
self,
callback: impl FnMut(GotPointerCapture) + 'static
) -> Self
Set an event handler.
fn onkeypress(self, callback: impl FnMut(KeyPress) + 'static) -> Self
fn onkeypress(self, callback: impl FnMut(KeyPress) + 'static) -> Self
Set an event handler.
fn onload(self, callback: impl FnMut(ResourceLoad) + 'static) -> Self
fn onload(self, callback: impl FnMut(ResourceLoad) + 'static) -> Self
Set an event handler.
fn onloadeddata(self, callback: impl FnMut(DataLoaded) + 'static) -> Self
fn onloadeddata(self, callback: impl FnMut(DataLoaded) + 'static) -> Self
Set an event handler.
fn onloadedmetadata(
self,
callback: impl FnMut(MetadataLoaded) + 'static
) -> Self
fn onloadedmetadata(
self,
callback: impl FnMut(MetadataLoaded) + 'static
) -> Self
Set an event handler.
fn onloadstart(self, callback: impl FnMut(LoadStart) + 'static) -> Self
fn onloadstart(self, callback: impl FnMut(LoadStart) + 'static) -> Self
Set an event handler.
fn onlostpointercapture(
self,
callback: impl FnMut(LostPointerCapture) + 'static
) -> Self
fn onlostpointercapture(
self,
callback: impl FnMut(LostPointerCapture) + 'static
) -> Self
Set an event handler.
fn onmouseenter(self, callback: impl FnMut(MouseEnter) + 'static) -> Self
fn onmouseenter(self, callback: impl FnMut(MouseEnter) + 'static) -> Self
Set an event handler.
fn onmouseleave(self, callback: impl FnMut(MouseLeave) + 'static) -> Self
fn onmouseleave(self, callback: impl FnMut(MouseLeave) + 'static) -> Self
Set an event handler.
fn onmousemove(self, callback: impl FnMut(MouseMove) + 'static) -> Self
fn onmousemove(self, callback: impl FnMut(MouseMove) + 'static) -> Self
Set an event handler.
fn onmouseout(self, callback: impl FnMut(MouseOut) + 'static) -> Self
fn onmouseout(self, callback: impl FnMut(MouseOut) + 'static) -> Self
Set an event handler.
fn onmouseover(self, callback: impl FnMut(MouseOver) + 'static) -> Self
fn onmouseover(self, callback: impl FnMut(MouseOver) + 'static) -> Self
Set an event handler.
fn onpointercancel(self, callback: impl FnMut(PointerCancel) + 'static) -> Self
fn onpointercancel(self, callback: impl FnMut(PointerCancel) + 'static) -> Self
Set an event handler.
fn onpointerdown(self, callback: impl FnMut(PointerDown) + 'static) -> Self
fn onpointerdown(self, callback: impl FnMut(PointerDown) + 'static) -> Self
Set an event handler.
fn onpointerenter(self, callback: impl FnMut(PointerEnter) + 'static) -> Self
fn onpointerenter(self, callback: impl FnMut(PointerEnter) + 'static) -> Self
Set an event handler.
fn onpointerleave(self, callback: impl FnMut(PointerLeave) + 'static) -> Self
fn onpointerleave(self, callback: impl FnMut(PointerLeave) + 'static) -> Self
Set an event handler.
fn onpointermove(self, callback: impl FnMut(PointerMove) + 'static) -> Self
fn onpointermove(self, callback: impl FnMut(PointerMove) + 'static) -> Self
Set an event handler.
fn onpointerout(self, callback: impl FnMut(PointerOut) + 'static) -> Self
fn onpointerout(self, callback: impl FnMut(PointerOut) + 'static) -> Self
Set an event handler.
fn onpointerover(self, callback: impl FnMut(PointerOver) + 'static) -> Self
fn onpointerover(self, callback: impl FnMut(PointerOver) + 'static) -> Self
Set an event handler.
fn onpointerup(self, callback: impl FnMut(PointerUp) + 'static) -> Self
fn onpointerup(self, callback: impl FnMut(PointerUp) + 'static) -> Self
Set an event handler.
fn onprogress(self, callback: impl FnMut(Progress) + 'static) -> Self
fn onprogress(self, callback: impl FnMut(Progress) + 'static) -> Self
Set an event handler.
fn onratechange(
self,
callback: impl FnMut(PlaybackRateChange) + 'static
) -> Self
fn onratechange(
self,
callback: impl FnMut(PlaybackRateChange) + 'static
) -> Self
Set an event handler.
fn onresize(self, callback: impl FnMut(ViewResize) + 'static) -> Self
fn onresize(self, callback: impl FnMut(ViewResize) + 'static) -> Self
Set an event handler.
fn onselectionchange(
self,
callback: impl FnMut(SelectionChange) + 'static
) -> Self
fn onselectionchange(
self,
callback: impl FnMut(SelectionChange) + 'static
) -> Self
Set an event handler.
fn onselectstart(self, callback: impl FnMut(SelectionStart) + 'static) -> Self
fn onselectstart(self, callback: impl FnMut(SelectionStart) + 'static) -> Self
Set an event handler.
fn onshow(self, callback: impl FnMut(ContextMenuShow) + 'static) -> Self
fn onshow(self, callback: impl FnMut(ContextMenuShow) + 'static) -> Self
Set an event handler.
fn ontimeupdate(self, callback: impl FnMut(TimeUpdate) + 'static) -> Self
fn ontimeupdate(self, callback: impl FnMut(TimeUpdate) + 'static) -> Self
Set an event handler.
fn onvolumechange(self, callback: impl FnMut(VolumeChange) + 'static) -> Self
fn onvolumechange(self, callback: impl FnMut(VolumeChange) + 'static) -> Self
Set an event handler.