dist/es5/dev/templating/dom.js
function onDOMAttached(el) {
            var _this2 = this;

            var handlers = [],
                attached = false,
                _step = undefined;

            if (el.el !== undefined) {
                _step = function step() {
                    if (attached) {
                        while (handlers.length > 0) {
                            handlers.shift()();
                        }
                    } else {
                        window.requestAnimationFrame(_step);
                        if (document.body.contains(el.el)) {
                            attached = true;
                        }
                    }
                };
            }
            return {
                then: function then(cb, context) {
                    handlers.push(cb.bind(context || _this2));
                    window.requestAnimationFrame(_step);
                }
            };
        }
function onDOMAttached(el) {
            var _this2 = this;

            var handlers = [],
                attached = false,
                _step = undefined;

            if (el.el !== undefined) {
                _step = function step() {
                    if (attached) {
                        while (handlers.length > 0) {
                            handlers.shift()();
                        }
                    } else {
                        window.requestAnimationFrame(_step);
                        if (document.body.contains(el.el)) {
                            attached = true;
                        }
                    }
                };
            }
            return {
                then: function then(cb, context) {
                    handlers.push(cb.bind(context || _this2));
                    window.requestAnimationFrame(_step);
                }
            };
        }
function onDOMAttached ( el ) { var _this2 = this ; var handlers = [ ] , attached = false , _step = undefined ; if ( el . el !== undefined ) { _step = function step ( ) { if ( attached ) { while ( handlers . length > 0 ) { handlers . shift ( ) ( ) ; } } else { window . requestAnimationFrame ( _step ) ; if ( document . body . contains ( el . el ) ) { attached = true ; } } } ; } return { then : function then ( cb , context ) { handlers . push ( cb . bind ( context || _this2 ) ) ; window . requestAnimationFrame ( _step ) ; } } ; }
executes when element attached to Dom  @method onDOMAttached @param {dom.Element} @param {function} cb @param {function} context
executes when element attached to Dom