DocumentOrShadowRoot.msElementsFromRect()

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

The msElementsFromRect method returns the node list of elements that are under a rectangle defined by left, top, width, and height.

This proprietary method is specific to Internet Explorer and Microsoft Edge.

Syntax

object.msElementsFromRect(left, top, width, height, retVal)

Parameters

left [in]
Type: Floating-point
top[in]
Type: Floating-point
width[in]
Type: Floating-point
height [in]
Type: Floating-point
retVal [out, reval]
Type: NodeList

Example

To find all of the elements under a given point, use msElementsFromPoint(x, y). To find all of the elements which intersect a rectangle, use msElementsFromRect(top, left, width, height).

var nodeList = document.msElementsFromRect(x,y,width,height)
var nodeList = document.msElementsFromPoint(x,y)

The returned nodeList is sorted by z-index so that you can tell the relative stacking order of the elements.

See also