Created
July 13, 2016 02:52
-
-
Save oosby/85e94b65c9f7712db32aac32c43dc34d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mutationObserver = new MutationObserver((e) => { | |
if (e[0].removedNodes) { | |
console.log('%cremoved nodes %o', 'color:aquamarine', e[0].removedNodes); | |
} | |
}); | |
// watch just the child nodes | |
mutationObserver.observe(document.querySelector('main'), { childList: true }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment