shadowrootmode="closed" renders identically to open

Expected: the two boxes below are pixel-identical. closed only removes the JavaScript handle to the shadow root — it changes nothing about rendering, slotting, encapsulation or the cascade.

slotted content slotted content

Encapsulation still holds

Expected: neither box's inner .box is red, despite the document rule .box { background: #fdd } — both shadow trees keep their own yellow.

Invalid mode value

Expected: no shadow root is attached — shadowrootmode="hidden" is not a valid value, so the template stays an inert template and only the light DOM text "fallback light content" is rendered.

fallback light content