event.on
on(eventName: string | symbol, listener: Function, context: unknown) → {EventEmitter}
Add a listener for a given event.
me.event.on("event-name", myFunction, this);
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
eventName | string | symbol |
The event name. |
||
listener | Function |
The listener function. |
||
context | unknown |
<optional> |
this |
The context to invoke the listener with. |
Type | Description |
---|---|
EventEmitter |
|