Re: [whatwg/dom] Use Infra to define mutation observers (#609)

```irc
<smaug> annevk: so, in Gecko DOMMutationObserver is the thing representing MutationObserver object. It has list of MutationReceivers which actually observers the mutations. Each such receiver may the have transient receivers. Right before a mutationobserver calls its callback, it goes through its mutationreceivers, and ask them to clear transient receivers
I guess that should answer to the first one... then the second question 
<smaug> and same happens with observe() https://searchfox.org/mozilla-central/source/dom/base/nsDOMMutationObserver.cpp#743
<annevk> hmm, that doesn't really map to the spec cleanly
<smaug> how so
<annevk> smaug: just that the spec has different concepts
<smaug> trying to see where
<annevk> smaug: oh so mutationreceivers are the nodes?
MutationObserver does have a node list
in the spec
<smaug> well, attached to nodes
<annevk> okay
so we'd iterate over the nodes and remove the transient registered observers from their registered observer list
<smaug> each receiver has target, and that target is a node
right, something like that
<annevk> smaug: and in observe we'd look at the registered observer's observer's node list and do the same is what you're saying?
<smaug> yeah, https://searchfox.org/mozilla-central/source/dom/base/nsDOMMutationObserver.cpp#743
in that code we update the receiver and remove the transient stuff
```

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

Received on Wednesday, 21 March 2018 18:18:28 UTC