on method

Evented on(
  1. String type,
  2. Function fn, [
  3. dynamic context
])

Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

Implementation

external Evented on(String type, Function fn, [dynamic context]);