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

Image for: Value

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

Examples

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

Specifications

Image for: Specifications
Specification
Fullscreen API
# ref-for-dom-document-fullscreenelement②

Browser compatibility

Image for: Browser compatibility

See also

Image for: See also