How MutationObserver Fixes What We Can’t Touch

Code snippet from mutation-watch.js showing a MutationObserver creation and observe options, beside a network/observer diagram.

MutationObserver is one of those JavaScript APIs that doesn’t get much attention until you actually need it, and then it becomes the only tool that works. It watches a piece of the page and fires a callback the moment something changes underneath it, an element gets added, an attribute flips, a class toggles. No polling…

Read More