--- title: DocumentOrShadowRoot.elementsFromPoint() slug: Web/API/Document/elementsFromPoint translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint original_slug: Web/API/DocumentOrShadowRoot/elementsFromPoint ---
{{APIRef("Shadow DOM")}}{{SeeCompatTable}}
elementsFromPoint() 是 {{domxref("DocumentOrShadowRoot")}} 下的一个函数,该函数返还在特定坐标点下的HTML元素数组。
var elements = document.elementsFromPoint(x, y);
一个包含 {{domxref('element')}} 对象的数组.
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('Shadow DOM','','elementsFromPoint()')}} | {{Spec2('Shadow DOM')}} | Initial definition. |
{{Compat("api.DocumentOrShadowRoot.elementsFromPoint")}}