Interface WindowEventHandlers

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

    Properties

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

    MDN Reference

    Methods