Re: [whatwg/dom] Introduce `moveBefore()` state-preserving atomic move API (PR #1307)

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



> +
+ <li><p>If <var>child</var> is null, then <a for=set>append</a> <var>node</var> to
+ <var>newParent</var>'s <a for=tree>children</a>.
+
+ <li><p>Otherwise, <a for=set>insert</a> <var>node</var> into <var>newParent</var>'s
+ <a for=tree>children</a> before <var>child</var>'s <a for=tree>index</a>.
+
+ <li><p>If <var>newParent</var> is a <a for=Element>shadow host</a> whose <a for=/>shadow root</a>'s
+ <a for=ShadowRoot>slot assignment</a> is "<code>named</code>" and <var>node</var> is a
+ <a>slottable</a>, then <a>assign a slot</a> for <var>node</var>.
+
+ <li><p>If <var>newParent</var>'s <a for=tree>root</a> is a <a for=/>shadow root</a>, and
+ <var>newParent</var> is a <a>slot</a> whose <a for=slot>assigned nodes</a> is the empty list,
+ then run <a>signal a slot change</a> for <var>newParent</var>.
+
+ <li><p>Run <a>assign slottables for a tree</a> with <var>node</var>'s <a for=tree>root</a>.

Does this happen somewhere also for the node's old parent? We need to re-assign slots also there.
(and are there tests for this?)

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

Message ID: <whatwg/dom/pull/1307/review/2515037580@github.com>

Received on Thursday, 19 December 2024 14:45:53 UTC