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

@domfarolino commented on this pull request.



> @@ -2652,6 +2652,50 @@ of a <var>node</var> into a <var>parent</var> before a <var>child</var>, run the
  <!-- Technically this is post-insert. -->
 </ol>
 
+<p>To <dfn export for=Node id=concept-node-ensure-pre-move-validity>ensure pre-move validity</dfn>
+of a <var>node</var> into a <var>parent</var> before a <var>child</var>, run these steps:
+
+<ol>
+ <li><p>If either <var>parent</var> or <var>node</var> are not <a>connected</a>, then
+ <a>throw</a> a "{{HierarchyRequestError!!exception}}" {{DOMException}}.</p></li>

I've made this PR support both the `connected->connected` and `disconnected->disconnected` case, as of https://github.com/whatwg/dom/pull/1307/commits/2bbc8346167310cc3e7f8d2ea65e5151c9cc219f. I think that's sufficient, and we've heard that developers want this too, so I think that's enough to resolve things here.

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

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

Received on Wednesday, 20 November 2024 15:22:28 UTC