code: function(doc) {
          var node = this._node;
          doc = (doc) ? doc._node || doc : node[OWNER_DOCUMENT];
          if (doc.documentElement) {
              return Y_DOM.contains(doc.documentElement, node);
          }
      }
docs: Determines whether the node is appended to the document.
  @method inDoc
  @param {Node|HTMLElement} doc optional An optional document to check against.
  Defaults to current document.
  @return {Boolean} Whether or not this node is appended to the document.