kylekyle / monitoring

A simple, efficient, and lightweight ES module to monitor the DOM for when elements are added, removed, have appeared, have disappeared, or are resized.
17 stars 1 forks source link

Add .changed() kind of observer #6

Open Destroy666x opened 1 year ago

Destroy666x commented 1 year ago

Would be nice to monitor if an item gets changed into matching a chosen selector. E.g. we have a <div> and a div.something selector. If we modify the <div> to <div class="something">, that would be caught and further processed with our own code like monitor.changed('div.something', el => { console.log(el) }).