documentelementFromPoint
document.elementFromPoint is a method on the Document interface in the DOM. It returns the top-most element at a specific point in the viewport, or null if no element is found at that location. The method takes two numeric arguments, x and y, which represent coordinates relative to the viewport’s origin (the visible area in the browser window).
The coordinates passed to elementFromPoint are typically derived from events such as mouse or pointer events,
Usage of document.elementFromPoint is common for custom interaction patterns, such as implementing drag-and-drop, custom tooltips, or
Notes and caveats: when used inside an iframe, coordinates are relative to the iframe’s viewport, not the