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.
SyntaxEdit
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.
ExampleEdit
function isVideoInFullsreen() {
if (document.mozFullScreenElement && document.mozFullScreenElement.nodeName == 'VIDEO') {
console.log('Your video is playing in fullscreen');
}
}
NotesEdit
See Using full-screen mode for details and examples.
Browser compatibilityEdit
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | ? | 9.0 (9.0) | ? | ? | ? |
SpecificationsEdit
This method has been proposed in the specification draft