From 27a12acda1c6e14d1ad979f75531d4154aad52a3 Mon Sep 17 00:00:00 2001 From: Piers Wombwell Date: Sat, 4 Jul 2026 19:02:50 +0100 Subject: [PATCH] Restore deep cloning of clonable shadow root contents. This restores the behaviour introduced by #1272. After #1334, the shadow-root cloning step says to clone each child of the shadow root with `subtree` set to `subtree`. When the original call is `host.cloneNode(false)`, that causes each direct child of a clonable shadow root to be cloned shallowly. That contradicts the behaviour agreed in #1249 / #1272 and the WPT `shadow-dom/shadow-root-clonable.html`, which expects a clonable shadow root to be cloned in its entirety even when the shadow host is shallow-cloned. --- dom.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index bc2d42c6..590ac26d 100644 --- a/dom.bs +++ b/dom.bs @@ -4964,7 +4964,7 @@ and an optional document docume

For each child of node's shadow root's children, in tree order: clone a node given child with document set to document, - subtree set to subtree, and + subtree set to true, and parent set to copy's shadow root.

This intentionally does not pass the