Created
September 11, 2017 04:44
-
-
Save brandonsheppard/8aa77c4b061287e437a9beaec0a3b210 to your computer and use it in GitHub Desktop.
Simple mutation observer
This file contains hidden or 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
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
console.log(mutation.type); | |
}); | |
}); | |
observer.observe(document.getElementById('bill_selector'), { | |
attributes: true, | |
childList: true, | |
characterData: true | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment