Travis build: 1252
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user