Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

WindowEventHandlers

interface WindowEventHandlers {
onafterprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
onbeforeprint: ((this: WindowEventHandlers, ev: Event) => any) | null;
onbeforeunload: ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any) | null;
ongamepadconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null;
ongamepaddisconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null;
onhashchange: ((this: WindowEventHandlers, ev: HashChangeEvent) => any) | null;
onlanguagechange: ((this: WindowEventHandlers, ev: Event) => any) | null;
onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
onmessageerror: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null;
onoffline: ((this: WindowEventHandlers, ev: Event) => any) | null;
ononline: ((this: WindowEventHandlers, ev: Event) => any) | null;
onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null;
onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null;
onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null;
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null;
onunload: ((this: WindowEventHandlers, ev: Event) => any) | null;
addEventListener<K extends keyof WindowEventHandlersEventMap>(
type: K,
listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends keyof WindowEventHandlersEventMap>(
type: K,
listener: (this: WindowEventHandlers, ev: WindowEventHandlersEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
options?: boolean | EventListenerOptions,
): void;
}

§Properties

§
onafterprint: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]
§
onbeforeprint: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]
§
onbeforeunload: ((this: WindowEventHandlers, ev: BeforeUnloadEvent) => any) | null
[src]
§
ongamepadconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null
[src]
§
ongamepaddisconnected: ((this: WindowEventHandlers, ev: GamepadEvent) => any) | null
[src]
§
onhashchange: ((this: WindowEventHandlers, ev: HashChangeEvent) => any) | null
[src]
§
onlanguagechange: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]
§
onmessage: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null
[src]
§
onmessageerror: ((this: WindowEventHandlers, ev: MessageEvent) => any) | null
[src]
§
onoffline: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]
§
ononline: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]
§
onpagehide: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null
[src]
§
onpageshow: ((this: WindowEventHandlers, ev: PageTransitionEvent) => any) | null
[src]
§
onpopstate: ((this: WindowEventHandlers, ev: PopStateEvent) => any) | null
[src]
§
onrejectionhandled: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null
[src]
§
onstorage: ((this: WindowEventHandlers, ev: StorageEvent) => any) | null
[src]
§
onunhandledrejection: ((this: WindowEventHandlers, ev: PromiseRejectionEvent) => any) | null
[src]
§
onunload: ((this: WindowEventHandlers, ev: Event) => any) | null
[src]

§Methods

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