Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/evt/lib/types/index.ts>dom.GlobalEventHandlers

💧EventEmitter's typesafe replacement
Go to Latest
interface dom.GlobalEventHandlers
import { type dom } from "https://deno.land/x/evt@v2.4.17/lib/types/index.ts";
const { GlobalEventHandlers } = dom;

Properties

onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null

Fires when the user aborts the download.

onanimationcancel: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null
onanimationend: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null
onanimationiteration: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null
onanimationstart: ((this: GlobalEventHandlers, ev: AnimationEvent) => any) | null
onauxclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null
onblur: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null

Fires when the object loses the input focus.

oncancel: ((this: GlobalEventHandlers, ev: Event) => any) | null
oncanplay: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when playback is possible, but would require further buffering.

oncanplaythrough: ((this: GlobalEventHandlers, ev: Event) => any) | null
onchange: ((this: GlobalEventHandlers, ev: Event) => any) | null

Fires when the contents of the object or selection have changed.

onclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user clicks the left mouse button on the object

onclose: ((this: GlobalEventHandlers, ev: Event) => any) | null
oncontextmenu: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user clicks the right mouse button in the client area, opening the context menu.

oncuechange: ((this: GlobalEventHandlers, ev: Event) => any) | null
ondblclick: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user double-clicks the object.

ondrag: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the source object continuously during a drag operation.

ondragend: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the source object when the user releases the mouse at the close of a drag operation.

ondragenter: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the target element when the user drags the object to a valid drop target.

ondragexit: ((this: GlobalEventHandlers, ev: Event) => any) | null
ondragleave: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

ondragover: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the target element continuously while the user drags the object over a valid drop target.

ondragstart: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null

Fires on the source object when the user starts to drag a text selection or selected object.

ondrop: ((this: GlobalEventHandlers, ev: DragEvent) => any) | null
ondurationchange: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the duration attribute is updated.

onemptied: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the media element is reset to its initial state.

onended: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the end of playback is reached.

Fires when an error occurs during object loading.

onfocus: ((this: GlobalEventHandlers, ev: FocusEvent) => any) | null

Fires when the object receives focus.

ongotpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
oninput: ((this: GlobalEventHandlers, ev: Event) => any) | null
oninvalid: ((this: GlobalEventHandlers, ev: Event) => any) | null
onkeydown: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null

Fires when the user presses a key.

onkeypress: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null

Fires when the user presses an alphanumeric key.

onkeyup: ((this: GlobalEventHandlers, ev: KeyboardEvent) => any) | null

Fires when the user releases a key.

onload: ((this: GlobalEventHandlers, ev: Event) => any) | null

Fires immediately after the browser loads the object.

onloadeddata: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when media data is loaded at the current playback position.

onloadedmetadata: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the duration and dimensions of the media have been determined.

onloadstart: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when Internet Explorer begins looking for media data.

onlostpointercapture: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onmousedown: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user clicks the object with either mouse button.

onmouseenter: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null
onmouseleave: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null
onmousemove: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user moves the mouse over the object.

onmouseout: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user moves the mouse pointer outside the boundaries of the object.

onmouseover: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user moves the mouse pointer into the object.

onmouseup: ((this: GlobalEventHandlers, ev: MouseEvent) => any) | null

Fires when the user releases a mouse button while the mouse is over the object.

onpause: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when playback is paused.

onplay: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the play method is requested.

onplaying: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the audio or video has started playing.

onpointercancel: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerdown: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerenter: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerleave: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointermove: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerout: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerover: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onpointerup: ((this: GlobalEventHandlers, ev: PointerEvent) => any) | null
onprogress: ((this: GlobalEventHandlers, ev: ProgressEvent) => any) | null

Occurs to indicate progress while downloading media data.

onratechange: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the playback rate is increased or decreased.

onreset: ((this: GlobalEventHandlers, ev: Event) => any) | null

Fires when the user resets a form.

onresize: ((this: GlobalEventHandlers, ev: UIEvent) => any) | null
onscroll: ((this: GlobalEventHandlers, ev: Event) => any) | null

Fires when the user repositions the scroll box in the scroll bar on the object.

onsecuritypolicyviolation: ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any) | null
onseeked: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the seek operation ends.

onseeking: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the current playback position is moved.

onselect: ((this: GlobalEventHandlers, ev: Event) => any) | null

Fires when the current selection changes.

onselectionchange: ((this: GlobalEventHandlers, ev: Event) => any) | null
onselectstart: ((this: GlobalEventHandlers, ev: Event) => any) | null
onstalled: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the download has stopped.

onsubmit: ((this: GlobalEventHandlers, ev: Event) => any) | null
onsuspend: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs if the load operation has been intentionally halted.

ontimeupdate: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs to indicate the current playback position.

ontoggle: ((this: GlobalEventHandlers, ev: Event) => any) | null
optional
ontouchcancel: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null
optional
ontouchend: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null
optional
ontouchmove: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null
optional
ontouchstart: ((this: GlobalEventHandlers, ev: TouchEvent) => any) | null
ontransitioncancel: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null
ontransitionend: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null
ontransitionrun: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null
ontransitionstart: ((this: GlobalEventHandlers, ev: TransitionEvent) => any) | null
onvolumechange: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when the volume is changed, or playback is muted or unmuted.

onwaiting: ((this: GlobalEventHandlers, ev: Event) => any) | null

Occurs when playback stops because the next frame of a video resource is not available.

onwheel: ((this: GlobalEventHandlers, ev: WheelEvent) => any) | null

Methods

addEventListener<K extends keyof GlobalEventHandlersEventMap>(
type: K,
listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void
removeEventListener<K extends keyof GlobalEventHandlersEventMap>(
type: K,
listener: (this: GlobalEventHandlers, ev: GlobalEventHandlersEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void