- From: ikeyan <notifications@github.com>
- Date: Wed, 20 May 2020 15:45:57 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 20 May 2020 22:46:10 UTC
@trusktr
So, the records should know which nodes they are for?
Then, I also think it's a sound and simpler behavior.
```js
// node A is a descendant of node B
observer.observe(A, {subtree: true, attributes: true});
observer.observe(B, {attributes: true});
// mutation queued: add a class attribute to node B
observer._queue = [{for: new Set([A, B]), message: "a class attribute added to B"}]
observer.unobserve(B);
// queue filtering. remove B from `for` attribute, and if `for` gets empty, the mutation record is thrown away
observer._queue = [{for: new Set([A]), message: "a class attribute added to B"}]
```
--
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/issues/126#issuecomment-631768440
Received on Wednesday, 20 May 2020 22:46:10 UTC