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

@domfarolino 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>.

OK I've added tests [here](https://chromium-review.googlesource.com/c/chromium/src/+/6111212) (pending) and addressed this in the spec with: https://github.com/whatwg/dom/pull/1307/commits/32a8a683e49c2772d08a622413500f69d0455f3a.

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

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

Received on Friday, 20 December 2024 14:54:03 UTC