code: function (element) {
          if (this.element) {
              OpenLayers.Event.stopObservingElement(this.element);
          } else {
              // keep a bound copy of handleBrowserEvent() so that we can
              // pass the same function to both Event.observe() and .stopObserving()
              this.eventHandler = OpenLayers.Function.bindAsEventListener(
                  this.handleBrowserEvent, this
              );
              
              // to be used with observe and stopObserving
              this.clearMouseListener = OpenLayers.Function.bind(
                  this.clearMouseCache, this
              );
          }
          this.element = element;
          var msTouch = !!window.navigator.msMaxTouchPoints;
          var type;
          for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
              type = this.BROWSER_EVENTS[i];
              // register the event cross-browser
              OpenLayers.Event.observe(element, type, this.eventHandler
              );
              if (msTouch && type.indexOf('touch') === 0) {
                  this.addMsTouchListener(element, type, this.eventHandler);
              }
          }
          // disable dragstart in IE so that mousedown/move/up works normally
          OpenLayers.Event.observe(element, "dragstart", OpenLayers.Event.stop);
      }
docs: Method: attachToElement
  
  Parameters:
  element - {HTMLDOMElement} a DOM element to attach browser events to