Skip to content

Instantly share code, notes, and snippets.

@nitayneeman
Last active September 11, 2017 16:14
Show Gist options
  • Save nitayneeman/bc1c7cad2008df630afc0beaeba265ca to your computer and use it in GitHub Desktop.
Save nitayneeman/bc1c7cad2008df630afc0beaeba265ca to your computer and use it in GitHub Desktop.
const node = document.querySelector('.some-element');
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => console.log(mutation));
});
observer.observe(node, {
attributes: true,
childList: true,
characterData: true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment