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.mozFullScreenElement

概述

返回当前文档中正在以全屏模式显示的Element节点,如果没有使用全屏模式,则返回null.

语法

var element = document.mozFullScreenElement;

示例

function isVideoInFullsreen() {
  if (document.mozFullScreenElement && document.mozFullScreenElement.nodeName == 'VIDEO') {
    console.log('您的视频正在以全屏模式显示');
  }
}

辅助

查看使用"全屏模式"页面了解详情.

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? 9.0 (9.0) ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 9.0 (9.0) ? ? ?

规范

该方法提案已经进入相关规范草案 https://dvcs.w3.org/hg/fullscrezh-CN/raw-file/tip/Overview.html#dom-document-fullscreenelement

相关链接

文档标签和贡献者

 此页面的贡献者: teoli, jsx, ziyunfei
 最后编辑者: jsx,