Skip to content

Instantly share code, notes, and snippets.

@cronfy
Created November 28, 2020 16:23
Show Gist options
  • Save cronfy/4505ed409268441eb97d3f39cc8a9e65 to your computer and use it in GitHub Desktop.
Save cronfy/4505ed409268441eb97d3f39cc8a9e65 to your computer and use it in GitHub Desktop.
WTF javascript is changing element in a DOM?
// who is changing element in DOM?
const element = $0
const callback = function () {
console.trace('here is who and how')
}
const observer = new MutationObserver(callback)
observer.observe(element, {subtree: true, childList: true, attributes: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment