code: function(target) {
          this.target = target;
          if (target.object instanceof OpenLayers.Map) {
              this.setMap(target.object);
          } else if (target.object instanceof OpenLayers.Layer.Vector) {
              if (target.object.map) {
                  this.setMap(target.object.map);
              } else {
                  target.object.events.register("added", this, function(evt) {
                      this.setMap(target.object.map);
                  });
              }
          } else {
              throw("Listeners for '" + this.provides.join("', '") +
                  "' events can only be registered for OpenLayers.Layer.Vector " + 
                  "or OpenLayers.Map instances");
          }
          for (var i=this.provides.length-1; i>=0; --i) {
              target.extensions[this.provides[i]] = true;
          }
      }
docs: Constructor: OpenLayers.Events.featureclick
  Create a new featureclick event type.
  
  Parameters:
  target - {<OpenLayers.Events>} The events instance to create the events
  for.