Re: [whatwg/dom] Atomic move operation for element reparenting & reordering (Issue #1255)

@noamr the whole discussion is about **not** landing `moveBefore` as it is so me opening a new discussion won't benefit anyone. I understand your use case (still edgy and not-clear what the developer would end up doing after a throw happens) but I don't like for this method to land in a developer hostile way.

I am also OK to stop discussing it but so far we have most libraries authors not happy about that throwing (using such name that is too similar to `insertBefore` that does not throw) and, like I've said, a method that duplicates checks on nodes would result as slow as me checking `isConnected` in an optimized way (i.e. checking the parent is connected once per multiple moves, instead of each time).

If there is no way this method can be renamed to `moveBeforeOrThrow` as low-level API so that we can discuss in the future a `moveBefore` that does not throw, I might as well rest my case and by the time I will have benchmarks will be too late to change the current state of this low-level API with a way too high-level name.

Unless explicitly asked to, I will stop commenting on this, or the other, issue.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/1255#issuecomment-2498055788
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/1255/2498055788@github.com>

Received on Monday, 25 November 2024 13:42:33 UTC