Re: [whatwg/dom] Proposal: New method to reorder child nodes (#891)

> DOM diffing is what everyone uses these days to make anything on the Web, because it's behind every single library, utility, framework, out there

For the record, this is not an exaggeration - even frameworks that do precise updates (Svelte, Solid, Sinuous, etc.) need to perform reordering operations one level deep, when dealing with lists.

It's also worth noting that this feature would support both types of frameworks equally well: frameworks that do precise updates can reorder a single range of child nodes - while frameworks that use a virtual DOM (or some other means of recursive updates) can call this function recursively. In the latter case, having a native reorder method would eliminate most of the complexity either way.

Is it too soon to start thinking about a prototype/proposal/polyfill?

Actually, *can* this functionality be polyfilled?

It probably can't be *precisely* polyfilled? If we're talking about details like triggering reflows and repaints etc.?

@WebReflection you have some experience in this area, I think? Any idea how much these details *matter*? I mean, they matter in terms of perf, which is one reason I think this proposal is relevant - but in terms of things like reflows, repaints, focus management, input and iframe states and so on, a native implementation probably could/should do certain things "better" than what we can do with existing DOM APIs in a polyfill, right? 🤔


-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/891#issuecomment-1100834003

You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/issues/891/1100834003@github.com>

Received on Sunday, 17 April 2022 08:51:20 UTC