Register Event Async

Signatures

bool registerEventAsync(string name, function handler)
bool registerEventAsync(string name, function handler, bool oneShot)

Description

Registers a handler that will be triggered asynchronously when the specified event occurs.

Returns whether the operation was successful (true) or not (false).

Arguments

Name

The name of the event to register.

Handler

The callback function that will be executed.

One Shot

If set to true, the handler will be unregistered after being executed once.

Is optional and set to false by default.

Notes

For a list of all events, you can view the Events page.

Last updated