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

@domfarolino commented on this pull request.



> + <li><p>Let <var>return node</var> be the result of <a>pre-inserting</a> <var>node</var> into
+ <a>this</a> before <var>child</var>.</p></li>

It's possible there is enough from "insert" that we'd omit in "move", to make it creation worth it, sure.

> At least to me a state flag seems rather unappealing.

With a separate "move" primitive _and_ the decision to throw when we can't "move", we could get rid of the state variable that's currently in "insert" (i.e., `<var>statePreservingAtomicMoveInProgress</var>`). But the state bool on _`Document`_ is what other specifications will refer to in their removal steps to react to a move appropriately, so I'm not sure we can get rid of _that_ one.

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

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

Received on Tuesday, 27 August 2024 14:22:57 UTC