on static method

void on(
  1. Element el,
  2. String types,
  3. Function fn, [
  4. dynamic context,
])

Adds a listener function (fn) to a particular DOM event type of the element el. 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 static void on(
  Element el,
  String types,
  Function fn, [
  dynamic context,
]);