on method

  1. @JS("on")
Future on(
  1. String eventName,
  2. Function func
)

Subscribe to event calling listener when the event occurs.

Implementation

@JS("on")
external Future on(String eventName, Function func);