Mojo.Event.listen
From WebOS101
This is a wrapper function for JavaScript's addEventListener() function. Mojo.Event.listen() requires three arguments to be useful. They are, in order, the target to observe, the event to look for, and the handler function to invoke when the event occurs on the target.
Example
Mojo.Event.listen(this.controller.get('someElement'), Mojo.Event.tap, function(){Mojo.Log.info('someElement has been tapped!');}.bindAsEventListener(this));
Note: It is not good programming practice to specify the handler function as shown in the example. Refer to the example at the Mojo.Event.stopListening() page for the preferred way to deal with events.
There is an optional fourth argument to Mojo.Event.listen(). Specifying true as the fourth argument causes the handler function to be invoked during the event capture phase rather than the event bubbling phase. If specified, the corresponding call to Mojo.Event.stopListening() must also specify true as the fourth argument.