🏠 New in High Baseline Support: document.elementFromPoint() and document.elementsFromPoint()

July 15, 2022

caniuse · mdn · [spec]([‘https://drafts.csswg.org/cssom-view-1/#dom-document-elementfrompoint’, ‘https://drafts.csswg.org/cssom-view-1/#dom-document-elementsfrompoint’])

The document.elementFromPoint() and document.elementsFromPoint() methods find the top-most element at a given point in the viewport, or all elements at a given point in the viewport, respectively.

Source features