on method
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);