A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/activeElement below:

ShadowRoot: activeElement property - Web APIs

MDN Web Docs
  1. References
  2. Web APIs
  3. ShadowRoot
  4. activeElement

Filter sidebar

In this article
  1. ShadowRoot
  2. Instance properties
    1. activeElement
    2. adoptedStyleSheets
    3. clonable
    4. delegatesFocus
    5. fullscreenElement
    6. host
    7. innerHTML
    8. mode
    9. pictureInPictureElement
    10. pointerLockElement
    11. serializable
    12. slotAssignment
    13. styleSheets
  3. Instance methods
    1. elementFromPoint() Non-standard
    2. elementsFromPoint() Non-standard
    3. getAnimations()
    4. getHTML()
    5. setHTMLUnsafe()
  4. Inheritance
    1. DocumentFragment
    2. Node
    3. EventTarget
In this article ShadowRoot: activeElement property

The activeElement read-only property of the ShadowRoot interface returns the element within the shadow tree that has focus.

Value

The Element which currently has focus, or null if there is no focused element.

Examples

js

let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let focusedElem = shadow.activeElement;
Specifications Specification HTML
# dom-documentorshadowroot-activeelement-dev
Browser compatibility See also Help improve MDN Was this page helpful to you? Learn how to contribute

.

This page was last modified on Apr 8, 2023 by MDN contributors.

View this page on GitHub

•

Report a problem with this content

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3