- From: Joe Pea <notifications@github.com>
- Date: Fri, 27 Dec 2019 18:13:27 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 28 December 2019 02:13:29 UTC
I wanted to avoid dumping a wall of text, so I'm re-making #482 here in a concise new issue: We currently have the `MutationObserver#observe(node, options)` method for selectively observing a certain `Node`, but we do not have a reciprocal `MutationObserver#unobserve(node, options)` method to selectively stop observing a specific `Node`. At the moment, the `MutationObserver#disconnect()` method stops observing all `Node`s that a `MutationObserver` instance is observing, which can be useful, but isn't always what we want. The main downside of having no `MutationObserver#unobserve` method is that we must then create one `MutationObserver` per `Node` for every `Node` that we may want to selectively stop observing, as opposed to having only a single `MutationObserver` for all said `Node`s. The upside of having `MutationObserver#unobserve` would be that we could re-use a single `MutationObserver` on many nodes while having ability to clean up observation of specific `Node`s, which would reduce memory and CPU usage. -- 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/812
Received on Saturday, 28 December 2019 02:13:29 UTC