Editor.registerEventHandler

Registers an event callback, for when an event with the given key is received.

class Editor
final
UUID
registerEventHandler
(
DataType
ResponseType
)
(
string key
,
ResponseType delegate(
DataType
)
event
)

Parameters

key
Type: string

The key of the event.

event
Type: ResponseType delegate(
DataType
)

The handler to call.

* Examples:

editor.registerEventHandler( "loopback", ( string receivedData ) { // Handle response // Return your response, or nothing if signify success without response. return receivedData; } );

Returns: The ID of the event, so it can be unregistered later.

Meta