Module M
Shadow DOM & Web Components
Open and closed shadow roots. Tests shadowRoot piercing in your automation tool.
Open shadow root
Inner elements have data-testid but live inside a shadow tree.
Closed shadow root (challenge)
Cannot be pierced via .shadowRoot from JS — must use special automation flags (e.g., Playwright's auto-pierce).
Web component with slot
Slotted content is in light DOM but rendered inside the shadow.
Nested shadow roots
A shadow tree containing another component with its own shadow.