utils/dom/getactiveelement
module
Functions
getActiveElement( node ) → Element | nullmodule:utils/dom/getactiveelement~getActiveElementReturns the focused element in the tree the given node lives in.
The shadow-aware replacement for
document.activeElement, which reports the host of a shadow tree rather than the focused element inside it. Pass any node from the tree whose focus is in question – typically the element being checked itself. Works for open and closed roots alike.Parameters
node: NodeThe node whose tree's active element should be returned.
Returns
Element | null