Re: [whatwg/dom] MutationObserver GC section looks bogus (Issue #1159)

Is (2) needed? Nodes may disappear from the list at any point. Somehow the node list would need to be able handle weak references and that should be enough, no?

I don't know if https://dom.spec.whatwg.org/#garbage-collection  is bogus. Perhaps not very clear though.
But if the node list could just explicitly handle weak references, that should be enough, I think.
Doing also (2) might make the spec easier to understand.

(In Gecko MutationObserver has a strong list of MutationReceivers, which are the things bound to a node to observe some changes. MutationReceivers don't own the relevant node. A MutationReceiver will get notified when the Node is about to be deleted and at that point it asks MutationObserver to drop any references to itself. Calling disconnect() removes all the MutationReceivers from the MutationObserver)

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

Message ID: <whatwg/dom/issues/1159/1428222322@github.com>

Received on Monday, 13 February 2023 16:15:29 UTC