document.mozFullScreenElement

概述

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

语法

var element = document.mozFullScreenElement;

示例

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

辅助

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

浏览器兼容性

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!

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) ? ? ?

规范

相关链接