Travis build: 1252

This commit is contained in:
30secondsofcode
2018-01-16 14:03:01 +00:00
parent 46c784b13b
commit ba495b3230
3 changed files with 79 additions and 10 deletions

View File

@ -9,16 +9,22 @@ Omit the third argument, `options`, to use the default [options](https://develop
```js
const 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));
observer.observe(
element,
Object.assign(
{
childList: true,
attributes: true,
attributeOldValue: true,
characterData: true,
characterDataOldValue: true,
subtree: true
},
options
)
);
return observer;
}
};
```
```js