Returns the Element
that is currently being presented in full-screen mode in this document, or null
if full-screen mode is not currently in use.
Syntax
var element = document.mozFullScreenElement;
On return, element is the element
that is currently in full-screen mode, or null
if full-screen mode isn't currently in use by the document.
Example
function isVideoInFullsreen() { if (document.mozFullScreenElement && document.mozFullScreenElement.nodeName == 'VIDEO') { console.log('Your video is playing in fullscreen'); } }
Notes
See Using full-screen mode for details and examples.
Browser compatibility
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) | ? | ? | ? |
Specifications
This method has been proposed in the specification draft