subscribeToDocumentEvent method
void
subscribeToDocumentEvent(
- String event,
- EventListener callback, {
- bool? useCapture,
- EventTarget? documentObject,
Adds an event listener to the document object and removes the event listener upon disposal.
If using this method, you cannot manually use the removeEventListener
method on the document singleton to remove the listener. At this point
the only way to remove the listener is to use the dispose method.
Implementation
void subscribeToDocumentEvent(String event, EventListener callback,
{bool? useCapture, EventTarget? documentObject}) {
if (documentObject == null) {
documentObject = document;
}
_subscribeToEvent(documentObject, event, callback, useCapture);
}