Created
March 21, 2018 15:04
-
-
Save vldvel/533a5298c5484e6fbd38676d30600a05 to your computer and use it in GitHub Desktop.
MutationObserver config
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
// by default all false | |
// you can pick as many as you want, but at least one of - attributes, characterData, or childList | |
const observerConfig = { | |
attributes: true, // attribute changes will be observed | on add/remove/change attributes | |
attributeOldValue: true, // will show oldValue of attribute | on add/remove/change attributes | default: null | |
characterData: true, // data changes will be observed | on add/remove/change characterData | |
characterDataOldValue: true, // will show OldValue of characterData | on add/remove/change characterData | default: null | |
childList: true, // target childs will be observed | on add/remove | |
subtree: true, // target childs will be observed | on attributes/characterData changes if they observed on target | |
attributeFilter: ['style'] // filter for attributes | array of attributes that should be observed, in this case only style | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment