Get to know MDN better
The activeElement read-only property of the ShadowRoot interface returns the element within the shadow tree that has focus.
The Element which currently has focus, or null if there is no focused element.
| HTML # dom-documentorshadowroot-activeelement-dev |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 8, 2023 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.