UNPKG

@base-ui/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

6 lines 394 B
// `Document.elementFromPoint` retargets shadow content to the shadow host, which then fails // `contains()` checks against a popup inside that shadow root, so callers pass `getRootNode()` // (a document or a shadow root) rather than `ownerDocument()`. export function getElementAtPoint(root, x, y) { return typeof root?.elementFromPoint === 'function' ? root.elementFromPoint(x, y) : null; }