diff options
Diffstat (limited to 'files/ja/conflicting/web/api/documentorshadowroot/index.html')
-rw-r--r-- | files/ja/conflicting/web/api/documentorshadowroot/index.html | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/files/ja/conflicting/web/api/documentorshadowroot/index.html b/files/ja/conflicting/web/api/documentorshadowroot/index.html new file mode 100644 index 0000000000..3d76892dbe --- /dev/null +++ b/files/ja/conflicting/web/api/documentorshadowroot/index.html @@ -0,0 +1,80 @@ +--- +title: DocumentOrShadowRoot.nodeFromPoint() +slug: conflicting/Web/API/DocumentOrShadowRoot +tags: + - API + - DocumentOrShadowRoot + - Method + - Non-standard + - Reference + - nodeFromPoint + - メソッド + - 標準外 +translation_of: Web/API/DocumentOrShadowRoot +translation_of_original: Web/API/DocumentOrShadowRoot/nodeFromPoint +original_slug: Web/API/DocumentOrShadowRoot/nodeFromPoint +--- +<div>{{APIRef("DOM")}}{{Non-standard_header}}</div> + +<p><span class="seoSummary">{{domxref("DocumentOrShadowRoot")}} インターフェイスの <strong><code>nodeFromPoint()</code></strong> プロパティは、 (ビューポートからの相対で) 指定された座標にある最上位のノードを返します。</span></p> + +<p>現在のところ、このメソッドは Firefox でしか実装されておらず、クロムコードでのみ利用できます。</p> + +<h2 id="Syntax" name="Syntax">構文</h2> + +<pre class="syntaxbox">var node = document.nodeFromPoint(x, y);</pre> + +<h3 id="Parameters" name="Parameters">引数</h3> + +<dl> + <dt><code>x</code></dt> + <dd>点の水平座標を表す倍精度浮動小数値。</dd> + <dt><code>y</code></dt> + <dd>点の垂直座標を表す倍精度浮動小数値。</dd> +</dl> + +<h3 id="Returns" name="Returns">返値</h3> + +<p>{{domxref('Node')}} オブジェクト。</p> + +<h2 id="Example" name="Example">例</h2> + +<h3 id="HTML_Content" name="HTML_Content">HTML Content</h3> + +<pre class="brush: html"><div> + <p>Some text</p> +</div> +<p>Top node at point 30, 20:</p> +<div id="output"></div> +</pre> + +<h3 id="JavaScript_Content" name="JavaScript_Content">JavaScript Content</h3> + +<pre class="brush: js;highlight[1]">var output = document.getElementById("output"); +if (document.nodeFromPoint) { + var node = document.nodeFromPoint(30, 20); + output.textContent += node.localName; +} else { + output.innerHTML = "<span style=\"color: red;\">" + + "Browser does not support <code>document.nodeFromPoint()</code>" + + "</span>"; +}</pre> + +<p>{{EmbedLiveSample('Example', '420', '120')}}</p> + +<h2 id="Specifications" name="Specifications">仕様書</h2> + +<p>現在はどの仕様書にも含まれていません。</p> + +<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2> + +<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div> + +<p>{{Compat("api.DocumentOrShadowRoot.nodeFromPoint")}}</p> + +<h2 id="See_Also" name="See_Also">関連情報</h2> + +<ul> + <li>{{DOMxRef("DocumentOrShadowRoot.nodesFromPoint()")}}</li> + <li>{{DOMxRef("DocumentOrShadowRoot.elementFromPoint()")}}</li> +</ul> |