Document: fullscreen property

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

The obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.

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.

Note: Since this property is deprecated, you can determine if fullscreen mode is active on the document by checking to see if Document.fullscreenElement is not null.

Value

A Boolean value which is true if the document is currently displaying an element in fullscreen mode; otherwise, the value is false.

Examples

This simple function reports whether or not fullscreen mode is currently active, using the obsolete fullscreen property.

js
function isDocumentInFullScreenMode() {
  return document.fullscreen;
}

This next example, on the other hand, uses the current fullscreenElement property to determine the same thing:

js
function isDocumentInFullScreenMode() {
  return document.fullscreenElement !== null;
}

If fullscreenElement isn't null, this returns true, indicating that fullscreen mode is in effect.

Specifications

Specification
Fullscreen API
# dom-document-fullscreen

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
fullscreen
Deprecated
Chrome – Full support
Chrome 15 (Release date: 2011-10-25)
altname
altname Alternate name: webkitIsFullScreen
Chrome – Full support
Chrome 71 (Release date: 2018-12-04)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
altname
altname Alternate name: webkitIsFullScreen
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 9 (Release date: 2011-12-20)
altname
altname Alternate name: mozFullScreen
Firefox – Full support
Firefox 64 (Release date: 2018-12-11)
footnote Full support
Opera – Full support
Opera 15 (Release date: 2013-07-02)
altname
altname Alternate name: webkitIsFullScreen
Opera – Full support
Opera 58 (Release date: 2019-01-23)
footnote Full support
Safari – Full support
Safari 6 (Release date: 2012-07-25)
altname
altname Alternate name: webkitIsFullScreen
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 18 (Release date: 2012-06-27)
altname
altname Alternate name: webkitIsFullScreen
Chrome Android – Full support
Chrome Android 71 (Release date: 2018-12-04)
footnote Full support
Firefox for Android – Full support
Firefox for Android 9 (Release date: 2011-12-21)
altname
altname Alternate name: mozFullScreen
Firefox for Android – Full support
Firefox for Android 64 (Release date: 2018-12-11)
footnote Full support
Opera Android – Full support
Opera Android 14 (Release date: 2013-05-21)
altname
altname Alternate name: webkitIsFullScreen
Opera Android – Full support
Opera Android 50 (Release date: 2019-02-18)
footnote Full support
Safari on iOS – Partial support
Safari on iOS 12 (Release date: 2018-09-17)
altname
footnote Partial support
altname Alternate name: webkitIsFullScreen
footnote Only available on iPad, not on iPhone.
Safari on iOS – Partial support
Safari on iOS 16.4 (Release date: 2023-03-27)
footnote Partial support
footnote Only available on iPad, not on iPhone.
footnote Shows an overlay button which can not be disabled. Swiping down exits fullscreen mode, making it unsuitable for some use cases like games.
Samsung Internet – Full support
Samsung Internet 1 (Release date: 2013-04-27)
altname
altname Alternate name: webkitIsFullScreen
Samsung Internet – Full support
Samsung Internet 10 (Release date: 2019-08-22)
footnote Full support
WebView Android – Full support
WebView Android 4.4 (Release date: 2013-12-09)
altname
altname Alternate name: webkitIsFullScreen
WebView Android – Full support
WebView Android 71 (Release date: 2018-12-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Deprecated. Not for use in new websites.
Uses a non-standard name
Has more compatibility info.

See also