Re: [whatwg/dom] Add convenient, ergonomic, performant API for sorting siblings (#586)

Full proposal:

```
parentEl.reorderChildren("my-attribute"); // sorts chidlren of parentEl numerically by my-attribute
```

And:

1. The update happens atomically, with Mutation Observer callbacks at the next microtask checkpoint, and that each observer receives at most one collected observation record.
 
2. The older `MutationEvents` are not fired at all for this operation. (Those are synchronous and deprecated, and I don't think we need/want to extend them to new APIs like this, and will get in the way of an efficient API.)

3. Any side effects such as reloading iframes still happen as usual, similar to if you call `insertBefore` on an element that is an iframe and change its DOM location.

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

Message ID: <whatwg/dom/issues/586/1414457981@github.com>

Received on Thursday, 2 February 2023 22:27:04 UTC