WindowEventHandlers - Web API 接口参考 编辑

WindowEventHandlers mixin 描述了事件处理程序常见的一些公共接口 ,例如WindowHTMLBodyElement 和 HTMLFrameSetElement等这些接口都实现了下列特定的事件处理程序。

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 EventHandler representing the code to be called when the afterprint event is raised.
WindowEventHandlers.onbeforeprint
Is an EventHandler representing the code to be called when the beforeprint event is raised.
WindowEventHandlers.onbeforeunload
Is an EventHandler representing the code to be called when the beforeunload event is raised.
WindowEventHandlers.onhashchange
Is an EventHandler representing the code to be called when the hashchange event is raised.
WindowEventHandlers.onlanguagechange
Is an EventHandler representing the code to be called when the languagechange event is raised.
WindowEventHandlers.onmessage
Is an EventHandler representing the code to be called when the message event is raised.
WindowEventHandlers.onoffline
Is an EventHandler representing the code to be called when the offline event is raised.
WindowEventHandlers.ononline
Is an EventHandler representing the code to be called when the online event is raised.
WindowEventHandlers.onpagehide
Is an EventHandler representing the code to be called when the pagehide event is raised.
WindowEventHandlers.onpageshow
Is an EventHandler representing the code to be called when the pageshow event is raised.
WindowEventHandlers.onpopstate
Is an EventHandler representing the code to be called when the popstate event is raised.
WindowEventHandlers.onstorage
Is an EventHandler representing the code to be called when the storage event is raised.
WindowEventHandlers.onunhandledrejection
An event handler for unhandled Promise rejection events.
WindowEventHandlers.onunload
Is an EventHandler representing the code to be called when the unload event is raised.

Methods

This interface defines no method.

Specifications

SpecificationStatusComment
HTML Living Standard
GlobalEventHandlers
Living StandardNo change since the latest snapshot, HTML 5.1.
HTML 5.1
GlobalEventHandlers
RecommendationSnapshot of HTML Living Standard. Added onlanguage since the HTML5 snapshot.
HTML5
GlobalEventHandlers
RecommendationSnapshot of HTML Living Standard. Creation of WindowEventHandlers (properties where on the target before it).

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!
FeatureFirefox (Gecko)ChromeInternet ExplorerOperaSafari
Basic support(Yes)(Yes)???
onhashchange3.6 (1.9.2)????
onlanguage32 (32)????
onstorage45 (45)????
FeatureFirefox Mobile (Gecko)AndroidIE MobileOpera MobileSafari Mobile
Basic support(Yes)????
onhashchange1.0 (1.9.2)????
onlanguage32.0 (32)????
onstorage45 (45)????

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:84 次

字数:14753

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文