R
fn

getActiveElement

v0.0.5tested

Returns the active element of the document (or shadow root)

Signature

ts
export function getActiveElement(doc: Document | ShadowRoot = document): HTMLElement | null{ ... }

Parameters

ParameterTypeDescription
doc?Document | ShadowRoot

Returns

HTMLElement | null