Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 1.02 KB

index.md

File metadata and controls

19 lines (16 loc) · 1.02 KB
title slug tags
Shadow tree
Glossary/Shadow_tree
DOM
Glossary
Shadow Tree
shadow DOM

A shadow tree is a tree of DOM nodes whose topmost node is a shadow root; that is, the topmost node within a shadow DOM. A shadow tree is a hidden set of standard DOM nodes which is attached to a standard DOM node that serves as a host. The hidden nodes are not directly visible using regular DOM functionality, but require the use of a special Shadow DOM API to access.

Nodes within the shadow tree are not affected by anything applied outside the shadow tree, and vice versa. This provides a way to encapsulate implementation details, which is especially useful for custom elements and other advanced design paradigms.

See also

  • Using shadow DOM
  • {{domxref("Element.shadowRoot")}} and {{domxref("Element.attachShadow()")}}
  • {{domxref("ShadowRoot")}}
  • {{HTMLElement("slot")}}