on method

void on(
  1. String types,
  2. QueryEventListener handler,
  3. {String selector}

Register a handler for events of given types on selected elements.

    • If selector is provided, only the descendant elements matched by the
  • selector will trigger the event. If omitted or null, the event will always
  • be triggered.
    • If data is provided, you can retrieve it in event.data in the handler.


void on(String types, QueryEventListener handler, {String selector});