EventHelper
A convenience object that simplifies the common pattern of attaching event listeners to several events, then removing all those listeners at once later, for example, in a destroy method.
const helper = new EventHelper();
helper.add(someObject.event, listener1, this);
helper.add(otherObject.event, listener2, this);
// later...
helper.removeAll();
Content copied to clipboard
See also
Functions
Link copied to clipboard
fun add(event: DefaultEvent, listener: () -> Unit, scope: ERROR CLASS: Symbol not found for JsAny?? = definedExternally): RemoveCallback
Adds a listener to an event, and records the registration to be cleaned up later.