On Wed, Nov 20, 2024 at 4:57 PM Jeffrey Yasskin <jyass...@chromium.org>
wrote:

> The TAG feedback
> <https://github.com/w3ctag/design-reviews/issues/976#issuecomment-2359457221>
> was a request to see if we could make this change to the other methods by
> default, instead of adding a parallel set. If that's web-compatible, we
> might not have to think about the larger package.
>

TAG deferred back to WHATWG with the feedback.
There was a lengthy discussion about this at WHATWG before and as a result
of the TAG feedback. The conclusion is that it's not feasible to change the
behavior of all the existing methods, and changing the behavior of only
some of them would be inconsistent and confusing.
There are only a couple of DOM methods that this applies to anyway
(appendChild, replaceChild). The other ones (e.g. append(), before()) work
on a series of elements so some of the assumptions that allow us to do this
don't work there in the same way.
It's worth mentioning that the current direction was also a strong view
from Gecko & WebKit folks.


> On Wed, Nov 20, 2024 at 8:32 AM Alex Russell <slightly...@chromium.org>
> wrote:
>
>> This is very exciting, and I'm eager for this capability to ship, but I'm
>> also worried that we're only doing one of the many append/insert API
>> variants here. Is this the start of a larger package of additions? Or the
>> only planned version?
>>
>
All the other insertion methods can be polyfilled on top of insertBefore,
so at least at first there could be a very small userland library that does
this as "sugar".
We can envision adding a move* variant to other methods in the future if
there is demand, there is nothing preventing us from doing this.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to blink-dev+unsubscr...@chromium.org.
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAJn%3DMYYrcgSoC9ojLMr_sj4gGNjA%2BKw30gCPppYH8EDsAcqiFg%40mail.gmail.com.

Reply via email to