Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MutationObserver = window.MutationObserver || window.WebKitMutationObserver; // comment if doesn't work
- var observer = new MutationObserver(function(mutations, observer) {
- // fired when a mutation occurs
- console.log(mutations, observer);
- // ...
- });
- // define what element should be observed by the observer
- // and what types of mutations trigger the callback
- observer.observe(document, {
- subtree: true,
- attributes: true
- //...
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement