Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssougnez/1f9b66e7ec292a4c9eead6010a96ca7b to your computer and use it in GitHub Desktop.
Save ssougnez/1f9b66e7ec292a4c9eead6010a96ca7b to your computer and use it in GitHub Desktop.
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