code: function (element) {
              var ownerDocument = element ? element.ownerDocument : null;
              return ownerDocument ? this.isAncestor(element, ownerDocument.body) : false;
          }
docs: Check whether an HTML element is in the DOM (a descendant of document.body).
  @param {HTMLElement} element The HTML element to check
  @return {Boolean} true if the HTML element is in the DOM hierarchy