Travis build: 1259 [custom]
This commit is contained in:
18
test/observeMutations/observeMutations.js
Normal file
18
test/observeMutations/observeMutations.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = observeMutations = (element, callback, options) => {
|
||||
const observer = new MutationObserver(mutations => mutations.forEach(m => callback(m)));
|
||||
observer.observe(
|
||||
element,
|
||||
Object.assign(
|
||||
{
|
||||
childList: true,
|
||||
attributes: true,
|
||||
attributeOldValue: true,
|
||||
characterData: true,
|
||||
characterDataOldValue: true,
|
||||
subtree: true
|
||||
},
|
||||
options
|
||||
)
|
||||
);
|
||||
return observer;
|
||||
};
|
||||
Reference in New Issue
Block a user