This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

elementFromPoint

Summary

Returns an element at specified coordinates.

Method of dom/shadowdom/ShadowRootdom/shadowdom/ShadowRoot

Syntax

var result = element.elementFromPoint(x, y);

Parameters

x

Data-type
String

The horizontal position of the element. May not be negative.

y

Data-type
String

The vertical position of the element. May not be negative.

Return Value

Returns an object of type ElementElement

If x is greater than the viewport width or if y is greater than the viewport height, excluding the size of any rendered scrollbars, returns null.