We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

document.mozFullScreen Redirect 1

« DOM Reference

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.


Reports whether or not the document is currently displaying content in fullscreen mode.

Note that the draft specification of the fullscreen API does not include a document.fullscreen attribute, and instead suggests checking whether document.fullscreenElement is non-null to determine whether the browser is in fullscreen mode. Using document.fullscreenElement to dertermine whether the browser is in fullscreen mode is recommend.


var isFullScreen = document.mozFullScreen || document.webkitIsFullScreen;

On return, isFullScreen is true if the document is being displayed in fullscreen mode; otherwise it's false.


function isDocumentInFullScreenMode() {
  // Note that the browser fullscreen (triggered by short keys) might
  // be considered different from content fullscreen when expecting a boolean
  return ((document.fullScreenElement && document.fullScreenElement !== null) ||    // alternative standard methods
      (!document.mozFullScreen && !document.webkitIsFullScreen));                   // current working methods


See Using fullscreen 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) ? ? ?


Not part of any specification.

See also

Document Tags and Contributors

 Last updated by: Sheppy,