Coffeekraken.io 0.0.1

mutationObservable

Observe mutations on an HTMLElement and get them through the observable subscription

Name Type Description Status Default
target { HTMLElement } The element to observe required
settings { MutationObserverInit } The mutation observer settings required

Return { Observable } The mutation observable

Example

    import mutationObservable from 'sugarcss/js/dom/mutationObservable'
mutationObservable(myCoolHTMLElement).subscribe((mutation) => {
        // do something with the mutation
});

See more : https://developer.mozilla.org/en/docs/Web/API/MutationObserver

Author : Olivier Bossel olivier.bossel@gmail.com