on method

String on(
  1. String event,
  2. Function function
)

Attaches an event listener.

Returns a short string identifying the attached listener — which string can be then used to remove that event listener with off.

Implementation

String on(String event, Function function) => _dispatcher.on(event, function);