MDN self-hosted library · e01.org

ShadowRoot: fullscreenElement property

Shadow DOM

Open notebook · 1 cells web-api-instance-property upstream source

Shadow DOM

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

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

Specifications

Browser compatibility

See also

  • Document.fullscreenElement