Shadow root

noun

say it: “SHAD-oh ROOT” /ˈʃædoʊ ruːt/

The top of a component's hidden inner tree, kept apart from the rest of the page, so the page's styles don't leak in and the component's styles don't leak out.

What is Shadow root?

Shadow root — A document fragment that forms the root of a component's encapsulated shadow tree.

In a sentence

  • “The page's red heading style didn't reach the card's heading, because it sat inside the card's shadow root.”
  • “In the Elements panel, the card's shadow root showed up as a "#shadow-root (open)" line with its private HTML inside.”

Level: Freelancer · More JavaScript terms at this level

Updated