subscribeToDomElementEvent method

void subscribeToDomElementEvent(
  1. Element element,
  2. String event,
  3. EventListener callback, {
  4. bool? useCapture,
})
inherited

Adds an event listener to the element object and removes the event listener upon disposal.

If using this method, you cannot manually use the removeEventListener method on the element to remove the listener. At this point the only way to remove the listener is to use the dispose method.

Implementation

void subscribeToDomElementEvent(
    Element element, String event, EventListener callback,
    {bool? useCapture}) {
  _subscribeToEvent(element, event, callback, useCapture);
}