Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Document.onfullscreenchange

这篇翻译不完整。请帮忙从英语翻译这篇文章

Document.onfullscreenchange 属性是 fullscreenchange 事件的处理器,这个事件在当前文档进入或者退出全屏的时候触发。

语法

targetDocument.onfullscreenchange = fullscreenChangeHandler;

示例

document.onfullscreenchange = function ( event ) { 
  console.log("FULL SCREEN CHANGE")
}; 
document.documentElement.onclick = function () {
  // requestFullscreen() 方法必须在一个事件处理器的方法体里执行,否则将会失败
  document.documentElement.requestFullscreen();
}

规范

Specification Status Comment
Fullscreen API
onfullscreenchange
Living Standard Initial definition.

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support ? 47 (47)[1] (behind full-screen-api.unprefix.enabled ? ? ?
Feature Android Android Webview Chrome for Android Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? 47 (47) [1] (behind full-screen-api.unprefix.enabled ? ? ? ?

[1] 在Firefox 49之前, 此属性从技术上来说属于GlobalEventHandlers, 但把相关的事件处理器绑定在一个Element上时却永远不会触发.

相关文章

文档标签和贡献者

 此页面的贡献者: libmw
 最后编辑者: libmw,