mutationObserver.disconnect({ flush: true })
#1283
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
topic: nodes
What problem are you trying to solve?
Calling
mutationObserver.disconnect()
while forgetting to handle any pending records is a common footgun.What solutions exist today?
Having to write boilerplate like:
Every time you want to stop observing is quite repetitive, and it cannot be done with just a reference to the mutation observer, since it requires a reference to its callback too.
How would you solve it?
Add a dictionary argument to
disconnect()
with aflush
option (name TBB) that does exactly this.Anything else?
No response
The text was updated successfully, but these errors were encountered: