ShadowRoot: fullscreenElement property

Limited availability

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

Want more browser support for this feature? Tell us why.

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 fullscreen mode, or null if there is no fullscreen 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

See also