DocumentOrShadowRoot - Document、またはShadowRoot
DocumentOrShadowRootは、Document、またはShadowRootが実装しているインターフェイスです。
概要
- 名前
- DocumentOrShadowRoot
- IDL
[NoInterfaceObject, Exposed=Window] interface DocumentOrShadowRoot { }; Document implements DocumentOrShadowRoot; ShadowRoot implements DocumentOrShadowRoot;
// Pointer Lock partial interface DocumentOrShadowRoot { readonly attribute Element? pointerLockElement; };
// Fullscreen API partial interface DocumentOrShadowRoot { [LenientSetter] readonly attribute Element? fullscreenElement; };
- 仕様書
- https://dom.spec.whatwg.org/#documentorshadowroot
- https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin (Pointer Lock)
- https://fullscreen.spec.whatwg.org/#api (Fullscreen API)
チュートリアル
DocumentOrShadowRootを取得する例です。このインターフェイスは、Document、またはShadowRootが実装しています。
// DocumentOrShadowRootを取得
var object = document ;
コンストラクタ
コンストラクタはありません。
プロパティ
fullscreenElement
フルスクリーン表示中の要素を返します。
pointerLockElement
ポインターロック中の要素を返します。
メソッド
固有のメソッドはありません。
定数
固有の定数はありません。
イベント
固有のイベントハンドラはありません。
サポート状況
クリックすると、バージョンごとの対応状況を確認できます。
Features | Chrome | Firefox | Safari | Edge | IE | Opera | iOS Safari | Android |
---|---|---|---|---|---|---|---|---|
DocumentOrShadowRoot | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 |
fullscreenElement | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 |
pointerLockElement | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 | 確認中 |
関連記事
- Document
- Documentは、ドキュメントを管理するための機能を備えたインターフェイスです。
- Document.getElementsByClassName()
- getElementsByClassName()は、Documentのメソッドです。class属性を指定して要素を取得します。
- Document()
- Document()は、Documentのコンストラクタです。新しいオブジェクトを作成します。
- Document.visibilityState
- visibilityStateは、Documentのプロパティです。最上位のブラウジングコンテキストが持つドキュメントの表示状態を文字列で返します。