Travis build: 1259 [custom]

This commit is contained in:
30secondsofcode
2018-01-16 14:20:25 +00:00
parent d11d20a129
commit e63c6bc840
9 changed files with 613 additions and 9 deletions

View 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;
};