Last active
June 14, 2018 10:24
-
-
Save ssougnez/1f9b66e7ec292a4c9eead6010a96ca7b 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
let observer = new MutationObserver((mutationsList) => { | |
console.log(`${mutationsList.length} change(s) detected`); | |
for (let mutation of mutationsList) { | |
console.log(mutation); | |
} | |
observer.disconnect(); | |
}); | |
observer.observe(div, { attributes: true }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment