WindowEventHandlers

The WindowEventHandlers mixin describes the event handlers common to several interfaces like Window, or HTMLBodyElement and HTMLFrameSetElement. Each of these interfaces can implement additional specific event handlers.

Note: WindowEventHandlers is a mixin and not an interface; you can't actually create an object of type WindowEventHandlers.

Properties

The events properties, of the form onXYZ, are defined on the WindowEventHandlers, and implemented by Window, and WorkerGlobalScope for Web Workers.

WindowEventHandlers.onafterprint

Is an event handler representing the code to be called when the afterprint event is raised.

WindowEventHandlers.onbeforeprint

Is an event handler representing the code to be called when the beforeprint event is raised.

WindowEventHandlers.onbeforeunload

Is an event handler representing the code to be called when the beforeunload event is raised.

WindowEventHandlers.onhashchange

Is an event handler representing the code to be called when the hashchange event is raised.

WindowEventHandlers.onlanguagechange

Is an event handler representing the code to be called when the languagechange event is raised.

WindowEventHandlers.onoffline

Is an event handler representing the code to be called when the offline event is raised.

WindowEventHandlers.ononline

Is an event handler representing the code to be called when the online event is raised.

WindowEventHandlers.onpagehide

Is an event handler representing the code to be called when the pagehide event is raised.

WindowEventHandlers.onpageshow

Is an event handler representing the code to be called when the pageshow event is raised.

WindowEventHandlers.onpopstate

Is an event handler representing the code to be called when the popstate event is raised.

WindowEventHandlers.onrejectionhandled

Is an event handler representing the code to be called when the rejectionhandled event is raised, indicating that a Promise was rejected and the rejection has been handled.

WindowEventHandlers.onstorage

Is an event handler representing the code to be called when the storage event is raised.

WindowEventHandlers.onunhandledrejection

Is an event handler representing the code to be called when the unhandledrejection event is raised, indicating that a Promise was rejected but the rejection was not handled.

WindowEventHandlers.onunload

Is an event handler representing the code to be called when the unload event is raised.

Methods

This interface defines no method.

Specifications

Specification
HTML Standard
# windoweventhandlers

Browser compatibility

BCD tables only load in the browser

See also