code: function(element) {
          var doc = Y.config.doc;
          if (element) {
              doc = (element[NODE_TYPE] === 9) ? element : // element === document
                  element[OWNER_DOCUMENT] || // element === DOM node
                  element.document || // element === window
                  Y.config.doc; // default
          }
  
          return doc;
      }
docs: TODO: make getDoc/Win true privates? 
  returns the appropriate document.
  @method _getDoc
  @private
  @param {HTMLElement} element optional Target element.
  @return {Object} The document for the given element or the default document.