shadow root vs. host
EventTarget ⟩ Node ⟩ DocumentFragment ⟩ ShadowRoot ⭐
Google ⟩ Creating shadow DOM
The shadow host must be either a custom element, or one of: “article”, “aside”, “blockquote”, “body”, “div”, “footer”, “h1…h6”, “header”, “main” “nav”, “p”, “section”, or “span”.
The spec defines a list of elements that can't host a shadow tree.
Last updated
Was this helpful?