Skip to content

events

liwe_event_register

liwe_event_register = ( modname: string, event: string, handler: LiWEEventHandler )

Registers an event handler for a specific event.

@see liwe_event_unregister

Parameters

Name Type Description
modname any The name of the module.
event any The name of the event.
handler any The event handler function.

Returns: ``


liwe_event_emit

liwe_event_emit = async ( req: ILRequest, event: string, data: any )

Emits a LiWE event and invokes all registered event handlers.

Parameters

Name Type Description
req any The ILRequest object.
event any The name of the event to emit.
data any The data associated with the event.

Returns: A Promise that resolves to an array of LiWEEventResponse objects.


liwe_event_unregister

liwe_event_unregister = ( event: string, handler: LiWEEventHandler )

Unregisters an event handler for a specific event.

@see liwe_event_register

Parameters

Name Type Description
event any The name of the event to unregister the handler from.
handler any The event handler function to unregister.

Returns: ``


liwe_event_list

liwe_event_list = ()

Retrieves the list of LIWE events.

Returns: {string[]} The list of LIWE events.