ShadowRoot.fullscreenElement
fullscreenElement は ShadowRoot インターフェイスの読み取り専用プロパティで、現在全画面モードで表示されているシャドウツリー内の要素を返します。
構文
js
shadowRoot.fullscreenElement
値
現在全画面モードで表示されている Element、または全画面モードの要素がなければ null を返します。
例
js
let customElem = document.querySelector('my-shadow-dom-element');
let shadow = customElem.shadowRoot;
let fullscreenElem = shadow.fullscreenElement;
仕様書
| Specification |
|---|
| Fullscreen API Standard # ref-for-dom-document-fullscreenelement② |
ブラウザーの互換性
BCD tables only load in the browser