ShadowRoot: fullscreenElement property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
ThefullscreenElement read-only property of theShadowRoot interface returns the element within the shadow tree that is currently displayed in full screen.
In this article
Value
TheElement which is currently is displayed in full screen mode,ornull 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②> |