3 ms·
Yes, though browsers have long been optimizing this by simply never processing mutation events unless the page has event handlers for them.
by db48x 6y ago
Yes, though browsers have long been optimizing this by simply never processing mutation events unless the page has event handlers for them.
- roca 6y agoMutationObserver is much more efficient than mutation events because it can group events into batches, vastly reducing the number of event handler callbacks when you're observing whole documents.