dist/shards-vue.umd.js
function DOMObserver (el, callback, opts) {
        if ( opts === void 0 ) opts = null;


        if (opts === null) {
            opts = {
                subtree: true,
                childList: true,
                characterData: true,
                attributes: true,
                attributeFilter: ['class', 'style']
            };
        }

        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
        var eventListenerSupported = window.addEventListener;

        el = el ? (el.$el || el) : null;
        if (!isElement(el)) {
            return null
        }

        var obs = null;

        if (MutationObserver) {
            obs = new MutationObserver(function (mutations) {
                var changed = false;
                for (var i = 0; i < mutations.length && !changed; i++) {
                    var mutation = mutations[i];
                    var type = mutation.type;
                    var target = mutation.target;
                    if (type === 'characterData' && target.nodeType === Node.TEXT_NODE) {
                        changed = true;
                    } else if (type === 'attributes') {
                        changed = true;
                    } else if (type === 'childList' && (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0)) {
                        changed = true;
                    }
                }
                if (changed) {
                    callback();
                }
            });

            obs.observe(el, Object.assign({}, { childList: true, subtree: true }, opts));
        } else if (eventListenerSupported) {
            el.addEventListener('DOMNodeInserted', callback, false);
            el.addEventListener('DOMNodeRemoved', callback, false);
        }

        return obs
    }
function DOMObserver (el, callback, opts) {
        if ( opts === void 0 ) opts = null;


        if (opts === null) {
            opts = {
                subtree: true,
                childList: true,
                characterData: true,
                attributes: true,
                attributeFilter: ['class', 'style']
            };
        }

        var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
        var eventListenerSupported = window.addEventListener;

        el = el ? (el.$el || el) : null;
        if (!isElement(el)) {
            return null
        }

        var obs = null;

        if (MutationObserver) {
            obs = new MutationObserver(function (mutations) {
                var changed = false;
                for (var i = 0; i < mutations.length && !changed; i++) {
                    var mutation = mutations[i];
                    var type = mutation.type;
                    var target = mutation.target;
                    if (type === 'characterData' && target.nodeType === Node.TEXT_NODE) {
                        changed = true;
                    } else if (type === 'attributes') {
                        changed = true;
                    } else if (type === 'childList' && (mutation.addedNodes.length > 0 || mutation.removedNodes.length > 0)) {
                        changed = true;
                    }
                }
                if (changed) {
                    callback();
                }
            });

            obs.observe(el, Object.assign({}, { childList: true, subtree: true }, opts));
        } else if (eventListenerSupported) {
            el.addEventListener('DOMNodeInserted', callback, false);
            el.addEventListener('DOMNodeRemoved', callback, false);
        }

        return obs
    }
function DOMObserver ( el , callback , opts ) { if ( opts === void 0 ) opts = null ; if ( opts === null ) { opts = { subtree : true , childList : true , characterData : true , attributes : true , attributeFilter : [ 'class' , 'style' ] } ; } var MutationObserver = window . MutationObserver || window . WebKitMutationObserver || window . MozMutationObserver ; var eventListenerSupported = window . addEventListener ; el = el ? ( el . $el || el ) : null ; if ( ! isElement ( el ) ) { return null } var obs = null ; if ( MutationObserver ) { obs = new MutationObserver ( function ( mutations ) { var changed = false ; for ( var i = 0 ; i < mutations . length && ! changed ; i ++ ) { var mutation = mutations [ i ] ; var type = mutation . type ; var target = mutation . target ; if ( type === 'characterData' && target . nodeType === Node . TEXT_NODE ) { changed = true ; } else if ( type === 'attributes' ) { changed = true ; } else if ( type === 'childList' && ( mutation . addedNodes . length > 0 || mutation . removedNodes . length > 0 ) ) { changed = true ; } } if ( changed ) { callback ( ) ; } } ) ; obs . observe ( el , Object . assign ( { } , { childList : true , subtree : true } , opts ) ) ; } else if ( eventListenerSupported ) { el . addEventListener ( 'DOMNodeInserted' , callback , false ) ; el . addEventListener ( 'DOMNodeRemoved' , callback , false ) ; } return obs }
Observes DOM changes.
@see http://stackoverflow.com/questions/3219758
Observes DOM changes .