Re: [whatwg/dom] Remove quadratic behavior from clone a node (PR #1334)

@smaug---- commented on this pull request.



> +    <a for=Element>shadow root</a>'s <a for=ShadowRoot>clonable</a> is true:
+
+    <ol>
+     <li><p><a for=/>Assert</a>: <var>copy</var> is not a <a for=Element>shadow host</a>.
+
+     <li><p><a>Attach a shadow root</a> with <var>copy</var>, <var>node</var>'s
+     <a for=Element>shadow root</a>'s <a for=ShadowRoot>mode</a>, true, <var>node</var>'s
+     <a for=Element>shadow root</a>'s <a for=ShadowRoot>serializable</a>, <var>node</var>'s
+     <a for=Element>shadow root</a>'s <a for=ShadowRoot>delegates focus</a>, and <var>node</var>'s
+     <a for=Element>shadow root</a>'s <a for=ShadowRoot>slot assignment</a>.
+
+     <li><p>Set <var>copy</var>'s <a for=Element>shadow root</a>'s <a for=ShadowRoot>declarative</a>
+     to <var>node</var>'s <a for=Element>shadow root</a>'s <a for=ShadowRoot>declarative</a>.
+
+     <li><p><a>Clone a node's children</a> given <var>node</var>'s <a for=Element>shadow root</a>,
+     <var>copy</var>'s <a for=Element>shadow root</a>, <var>document</var>, and <var>subtree</var>.

Don't we want shadow root cloning to happen after appending to avoid calling insertion steps again when the host is added to its parent?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1334#pullrequestreview-2502125334
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1334/review/2502125334@github.com>

Received on Friday, 13 December 2024 11:56:19 UTC