SYNCERのロゴ
アイキャッチ画像

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

ポインターロック中の要素を返します。

メソッド

固有のメソッドはありません。

定数

固有の定数はありません。

イベント

固有のイベントハンドラはありません。

サポート状況

クリックすると、バージョンごとの対応状況を確認できます。

FeaturesChromeFirefoxSafariEdgeIEOperaiOS SafariAndroid
DocumentOrShadowRoot確認中確認中確認中確認中確認中確認中確認中確認中
fullscreenElement確認中確認中確認中確認中確認中確認中確認中確認中
pointerLockElement確認中確認中確認中確認中確認中確認中確認中確認中
  • Twitterでシェア
  • Facebookでシェア
  • Google+でシェア
  • はてなブックマークでシェア
  • pocketに保存
  • LINEでシェア
更新履歴
2017年10月5日 (木)
コンテンツを公開しました。