code: function(element) {
          var doc = Y.DOM._getDoc(element);
          return doc[DEFAULT_VIEW] || doc[PARENT_WINDOW] || Y.config.win;
      }
docs: returns the appropriate window.
  @method _getWin
  @private
  @param {HTMLElement} element optional Target element.
  @return {Object} The window for the given element or the default window.