constructor new Event.Handler
new Event.Handler(element, eventName[, selector], callback)
-
element(Element) – The element to listen on. -
eventName(String) – An event to listen for. Can be a standard browser event or a custom event. -
selector(String) – A CSS selector. If specified, will callcallbackonly when it can find an element that matchesselectorsomewhere in the ancestor chain between the event's target element and the givenelement. -
callback(Function) – The event handler function. Should expect two arguments: the event object and the element that received the event. (Ifselectorwas given, this element will be the one that satisfies the criteria described just above; if not, it will be the one specified in theelementargument).
Instantiates an Event.Handler. Will not begin observing until
Event.Handler#start is called.