listenTo
obj.listenTo(other, event, handler)
Listens for an event on another object. This is similar to concepts like event namespacing, except that the namespace is the scope of the calling object.
Parameters
- other
{Object}
:The object to listen for events on.
- event
{String}
:The name of the event to listen for.
- handler
{function}
:The handler that will be executed to handle the event.
Returns
{Object}
:
this
canEvent.listenTo.call(obj, other, event, handler)
This syntax can be used for objects that don't include the can-event mixin.