Re: [whatwg/dom] MutationObserver callbacks happen in wrong order. (Issue #1105)

The most difficult question to answer using `MutationObserver` is: which parent was this child remove from?

As soon as there are more than one parent with MOs, causing reactions not to be interleaved in the same order as code that modifies the DOM, it seems impossible to answer this question.

If *all* reactions across *all* MOs of a batch of MOs were interleaved in the same order as DOM manipulations, the answer would be simple: the very first reaction has the initial parent the child has been remove from.

Without being able to determine this one piece of information, it is impossible to make a choice on which parent to clean child structures up on before finally initializing new structures on the new parent.

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

Message ID: <whatwg/dom/issues/1105/1229128822@github.com>

Received on Saturday, 27 August 2022 05:41:22 UTC