WindowEventHandlers
WindowEventHandlers
mixin 描述了事件处理程序常见的一些公共接口 ,例如Window
和 HTMLBodyElement
和 HTMLFrameSetElement
(en-US)等这些接口都实现了下列特定的事件处理程序。
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 theafterprint (en-US)
event is raised. WindowEventHandlers.onbeforeprint
- Is an
event handler
representing the code to be called when thebeforeprint (en-US)
event is raised. WindowEventHandlers.onbeforeunload
- Is an
event handler
representing the code to be called when thebeforeunload (en-US)
event is raised. WindowEventHandlers.onhashchange
- Is an
event handler
representing the code to be called when thehashchange (en-US)
event is raised. WindowEventHandlers.onlanguagechange
Experimental- Is an
event handler
representing the code to be called when thelanguagechange (en-US)
event is raised. WindowEventHandlers.onmessage
- Is an
event handler
representing the code to be called when themessage
event is raised. WindowEventHandlers.onoffline
- Is an
event handler
representing the code to be called when theoffline (en-US)
event is raised. WindowEventHandlers.ononline
- Is an
event handler
representing the code to be called when theonline (en-US)
event is raised. WindowEventHandlers.onpagehide
- Is an
event handler
representing the code to be called when thepagehide (en-US)
event is raised. WindowEventHandlers.onpageshow
- Is an
event handler
representing the code to be called when thepageshow (en-US)
event is raised. WindowEventHandlers.onpopstate
- Is an
event handler
representing the code to be called when thepopstate (en-US)
event is raised. WindowEventHandlers.onstorage
- Is an
event handler
representing the code to be called when thestorage (en-US)
event is raised. WindowEventHandlers.onunhandledrejection
(en-US) Experimental- An event handler for unhandled
Promise
rejection events. WindowEventHandlers.onunload
- Is an
event handler
representing the code to be called when theunload (en-US)
event is raised.
Methods
This interface defines no method.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard GlobalEventHandlers |
Living Standard | No change since the latest snapshot, HTML 5.1. |
HTML 5.1 GlobalEventHandlers |
Recommendation | Snapshot of HTML Living Standard. Added onlanguage since the HTML5 snapshot. |
HTML5 GlobalEventHandlers |
Recommendation | Snapshot of HTML Living Standard. Creation of WindowEventHandlers (properties where on the target before it). |
Browser compatibility
No compatibility data found for api.WindowEventHandlers
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.