Callbacks
Execute logic when a listener library loads.
Define a listenerLoaded
callback function within a listener library:
Callbacks functions can be asynchronous. When a library has asynchronous callbacks, the end user can await the promise returned by listener.load
.
The import in this example has no effect on compiled output. It is purely for accessing types.
Callback arguments
Callbacks receive two arguments, a listener id (lid
) and a listener event object:
Available callbacks
Last updated