addEvent

  • function
 

obj.addEvent( event, handler )

Add a basic event listener to an object.

Parameters

  1. event {String}

    The name of the event to listen for.

  2. handler {function()}

    The handler that will be executed to handle the event.

Returns

{Object}

this

can.event.addEvent.call( obj, event, handler )

This syntax can be used for objects that don't include the can.event mixin.