Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var targetNode = document.body;
- var observer = new MutationObserver(mutationObjectCallback);
- var observerConfig = {
- attributes: true,
- childList: true,
- characterData: true
- };
- observer.observe(targetNode, observerConfig);
- function mutationObjectCallback(mutations) {
- mutations.forEach(function(mutation) {
- console.log(mutation);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement