Getting To Know The MutationObserver API

1 · CSS-Tricks · May 8, 2019, 2:45 p.m.
MutationObserver watches the DOM, specifically the places you tell it to, like: document.querySelector('#watch-this'); ...and it can tell you (trigger a callback) when stuff happens — like when a child is added, removed, changed, or a number of other things. I used it just the other day to watch the <head> of a Pen and detected newly-injected processed Sass code, so you could use CodePen to see Sass and CSS side by side: See the Pen Sassmeister clone by Chris … Read article The post Ge...