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