Created
October 20, 2015 18:24
-
-
Save citylims/f6033cdffcd534cb04b9 to your computer and use it in GitHub Desktop.
DOM Mutation Observer.
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
MutationObserver = window.WebKitMutationObserver; | |
var observer = new MutationObserver(function(mutations, observer) { | |
console.log(mutations, observer); | |
foo() | |
}); | |
observer.observe(document, { | |
subtree: true, | |
childList: true, | |
attribute: false | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment