From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/documentorshadowroot/index.html | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ja/web/api/documentorshadowroot/index.html (limited to 'files/ja/web/api/documentorshadowroot/index.html') diff --git a/files/ja/web/api/documentorshadowroot/index.html b/files/ja/web/api/documentorshadowroot/index.html new file mode 100644 index 0000000000..41a6afbfa8 --- /dev/null +++ b/files/ja/web/api/documentorshadowroot/index.html @@ -0,0 +1,78 @@ +--- +title: DocumentOrShadowRoot +slug: Web/API/DocumentOrShadowRoot +tags: + - API + - Document + - DocumentOrShadowRoot + - Reference + - ShadowRoot + - インターフェイス + - シャドウ DOM +translation_of: Web/API/DocumentOrShadowRoot +--- +
{{APIRef("Web Components")}}
+ +

DocumentOrShadowRootShadow DOM API のミックスインで、文書とシャドウルートで共有される API を提供します。以下の機能は {{DOMxRef("Document")}} と {{DOMxRef("ShadowRoot")}} の両方に含まれています。

+ +

プロパティ

+ +
+
{{DOMxRef("DocumentOrShadowRoot.activeElement")}}{{ReadOnlyInline}}
+
シャドウツリー内でフォーカスを持っている {{DOMxRef('Element')}} を返します。
+
{{DOMxRef("DocumentOrShadowRoot.fullscreenElement")}}{{ReadOnlyInline}}
+
この文書で現在全画面モードになっている {{DOMxRef('Element')}} を返します。
+
{{DOMxRef("DocumentOrShadowRoot.pointerLockElement")}} {{Experimental_Inline}}{{ReadOnlyInline}}
+
ポインターがロックされている間、マウスイベントのターゲットとして設定された要素を返します。ロック待ちの場合、ポインターがロックされていない場合、ターゲットが別な文書である場合は null を返します。
+
{{DOMxRef("DocumentOrShadowRoot.styleSheets")}}{{ReadOnlyInline}}
+
文書に明示的にリンクされているか、埋め込まれているスタイルシートの {{DOMxRef('CSSStyleSheet')}} オブジェクトの {{DOMxRef('StyleSheetList')}} を返します。
+
+ +

メソッド

+ +
+
{{DOMxRef("DocumentOrShadowRoot.caretPositionFromPoint()")}}
+
キャレットを含んでいる DOM ノードと、そのノード内におけるキャレットの文字のオフセットを含む {{DOMxRef('CaretPosition')}} オブジェクトを返します。
+
{{DOMxRef("DocumentOrShadowRoot.elementFromPoint()")}}
+
指定された座標にある最上位の要素を返します。
+
{{DOMxRef("DocumentOrShadowRoot.elementsFromPoint()")}}
+
指定された座標にあるすべての要素の配列を返します。
+
{{DOMxRef("DocumentOrShadowRoot.getSelection()")}}
+
ユーザーによって選択されているテキストの範囲、またはキャレットの現在の位置を表す {{DOMxRef('Selection')}} オブジェクトを返します。
+
{{DOMxRef("DocumentOrShadowRoot.nodeFromPoint()")}} {{non-standard_inline}}
+
指定された座標にある最上位のノードを返します。
+
{{DOMxRef("DocumentOrShadowRoot.nodesFromPoint()")}} {{non-standard_inline}}
+
指定された座標にあるすべてのノードの配列を返します。
+
+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}}{{Spec2('Shadow DOM')}}Shadow DOM で実装。
{{SpecName('DOM WHATWG','#mixin-documentorshadowroot','DocumentOrShadowRoot')}}{{Spec2('DOM WHATWG')}}初回定義
+ +

ブラウザーの対応

+ + + +

{{Compat("api.DocumentOrShadowRoot")}}

+ +

[1] このインターフェイスの機能は {{DOMxRef("Document")}} オブジェクトにも実装されています。

-- cgit v1.2.3-54-g00ecf