Coffeekraken.io 0.0.1

attributesObservable

Observe attributes on an HTMLElement and get mutations 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 attributesObservable from 'sugarcss/js/dom/attributesObservable'
attributesObservable(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

Settings

Here's the list of available settings.

attributes

List of attributes to observe

Type : { Array }

Default : null