whole_func_string: 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);
                  }
              };
          }
func_code_string: 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);
                  }
              };
          }
func_documentation_string: executes when element attached to Dom  @method onDOMAttached @param {dom.Element} @param {function} cb @param {function} context