function getActiveElement() {
    let result = getActiveDocument().activeElement;
    while (result === null || result === void 0 ? void 0 : result.shadowRoot) {
        result = result.shadowRoot.activeElement;
    }
    return result;
}
Returns the active element across all child windows
based on document focus. Falls back to the main
window if no window has focus.