ShadowRoot: fullscreenElement property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The fullscreenElement read-only property of the ShadowRoot interface returns the element within the shadow tree that is currently displayed in full screen.

Value

The Element which is currently is displayed in full screen mode, or null if there is no full screen element.

Examples

js
let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let fullscreenElem = shadow.fullscreenElement;

Specifications

Specification
Fullscreen API
# ref-for-dom-document-fullscreenelement②

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
fullscreenElement
Chrome – Full support
Chrome 71 (Release date: 2018-12-04)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – Full support
Firefox 63 (Release date: 2018-10-23)
altname
altname Alternate name: mozFullScreenElement
Firefox – Full support
Firefox 64 (Release date: 2018-12-11)
footnote Full support
Opera – Full support
Opera 58 (Release date: 2019-01-23)
footnote Full support
Safari – Full support
Safari 16.4 (Release date: 2023-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 71 (Release date: 2018-12-04)
footnote Full support
Firefox for Android – Full support
Firefox for Android 63 (Release date: 2018-10-23)
altname
altname Alternate name: mozFullScreenElement
Firefox for Android – Full support
Firefox for Android 64 (Release date: 2018-12-11)
footnote Full support
Opera Android – Full support
Opera Android 50 (Release date: 2019-02-18)
footnote Full support
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 10 (Release date: 2019-08-22)
footnote Full support
WebView Android – Full support
WebView Android 71 (Release date: 2018-12-04)
footnote Full support
WebView on iOS – Partial support
WebView 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.

Legend

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

Full support
Full support
Partial support
Partial support
Uses a non-standard name
Has more compatibility info.

See also