Register Event Sync
Signatures
bool registerEventSync(string name, function handler)
bool registerEventSync(string name, function handler, bool oneShot)Description
Registers a handler that will be triggered synchronously 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
Last updated