- From: Andrea Giammarchi <notifications@github.com>
- Date: Sat, 23 Nov 2024 12:59:15 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 23 November 2024 20:59:19 UTC
> Anything using moveBefore will fallback to insertBefore no matter what. There's literally 0 use-cases for throwing. not adding much but beside fully agreeing with this sentence, the hidden footgun this API is throwing at developers is that even libraries "*sure enough*" to move around their own nodes can't prevent other libraries to interfere with live nodes ... so, ensureing not-live nodes, or nodes moved elsewhere, where the DOM has no mechanism to provide, or prevent, nodes ownership, looks really like somebody overlooked at the reason this API is desired in the first place: the intent is in the name, nothing else should happen ... if the intent can be clear, let it be, if it needs internals disambiguations for when that canot be performed, let that be *an internal implementation detail no Web developer asked for or cared about when `moveBefore` was meant to be used*. Again, this API should be the new `insertBefore` that boosts performance to everyone using it, it's becoming a footgun `try/catch` trap instead nobody concretely needs on the Web. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/issues/1255#issuecomment-2495653077 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/issues/1255/2495653077@github.com>
Received on Saturday, 23 November 2024 20:59:19 UTC