[whatwg/dom] Correct MutationObserver ownership story (PR #1160)

The existing design had some leaks and was also different from implementations. In particular, assume you have two mutation observers and a change triggered the first one as well as a slot change. Then if in the reaction to the first one a further change triggers the second one it would run before the slot change per the existing specification, but that didn't match implementations and more importantly didn't allow for garbage collection.

Test: https://github.com/web-platform-tests/wpt/blob/master/shadow-dom/slotchange-event.html#L540-L594.

Fixes #713. Fixes #1159. Closes #720.
You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/dom/pull/1160

-- Commit Summary --

  * Correct MutationObserver ownership story

-- File Changes --

    M dom.bs (34)

-- Patch Links --

https://github.com/whatwg/dom/pull/1160.patch
https://github.com/whatwg/dom/pull/1160.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1160
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/dom/pull/1160@github.com>

Received on Monday, 13 February 2023 17:24:18 UTC