The Document.fullscreenElement read-only property 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.

Although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.


var element = document.fullscreenElement;

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.


function isVideoInFullscreen() {
  if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {
    console.log('Your video is playing in fullscreen');


Specification Status Comment
Fullscreen API
The definition of 'Document.fullscreenElement' in that specification.
Living Standard Initial definition

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support531 Yes2



Yes40 Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support5353 Yes



40 Yes6.0

1. Supported as webkitFullscreenElement.

2. Supported as msFullscreenElement.

3. Supported as mozFullScreenElement.

4. From version 47: this feature is behind the full-screen-api.unprefix.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

Last updated by: jpmedley,