instance method Event#extend

View source on GitHub →

Event#extend() → Event
  • event (Event) – An Event object

Extends event with all of the methods contained in Event.Methods.

Note that all events inside handlers that were registered using Event.observe or Element.observe will be extended automatically.

You need only call Event.extend manually if you register a handler a different way (e.g., the onclick attribute). We really can't encourage that sort of thing, though.

This method can be called either as an instance method or as a generic method. If calling as a generic, pass the instance in as the first argument.