Last active
October 19, 2019 03:12
-
-
Save vldvel/4ba9b0e7f3191828525e9ea875052919 to your computer and use it in GitHub Desktop.
MutationObserver subscriber simple
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
function subscriber(mutations) { | |
console.log(mutations);// [...] | |
console.log(mutations.constructor);// Array | |
mutations.forEach((mutation) => { | |
console.log(mutation); // {...} | |
console.log(mutation.constructor); // MutationRecord | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment