11 KiB
| title | chunk | source | category | tags | date_saved | instance |
|---|---|---|---|---|---|---|
| Shadow tree - Glossary | MDN | 1/3 | https://developer.mozilla.org/en-US/docs/Glossary/Shadow_tree | reference | web, html, css, javascript, documentation | 2026-05-05T05:45:08.703030+00:00 | kb-cron |
MDN HTML HTML: Markup language
HTML reference
HTML guides
Markup languages
CSS reference
CSS guides
Layout cookbook
JavaScriptJS JavaScript: Scripting language
JS reference
JS guides
Web APIs Web APIs: Programming interfaces
Web API reference
Web API guides
- Using the Web animation API
- Using the Fetch API
- Working with the History API
- Using the Web speech API
- Using web workers
Technologies
Topics
Learn Learn web development
Frontend developer course
- Getting started modules
- Core modules
- MDN Curriculum
- Check out the video course from Scrimba, our partner
Learn HTML
Learn CSS
Learn JavaScript
Tools Discover our tools
About Get to know MDN better
Shadow tree
A shadow tree is a hidden set of DOM nodes whose topmost node is a shadow root. The shadow root is the topmost node of a shadow DOM and not part of the regular document's DOM tree. The shadow root is attached to another node tree through a specific DOM node referred to as its host. This host may be part of another shadow tree or part of the regular DOM tree. The node tree of a shadow root's host is sometimes referred to as the light tree. The hidden DOM nodes of a shadow tree are generally not affected by anything applied outside the shadow tree, and vice versa. The shadow boundary , where the shadow DOM ends and the regular DOM begins, can be traversed, but only very intentionally:
- Scripting shadow tree nodes from outside requires the use of a special Shadow DOM API to be accessed.
- Styling a shadow tree from outside can be achieved via CSS scoping and CSS shadow parts.
In this article
See also
- Using shadow DOM
Element.shadowRootandElement.attachShadow()ShadowRoot<slot>- CSS shadow parts module
- CSS scoping module
- Related glossary terms: