evCreate API 5.7 Help

RegisterCallback Function

Registers a given callback function for given types of events that will occur and be broadcast during the current document editing session in the Canvas Envision Creator web app.

RegisterCallback( callback: [[[EvEventCallback|eveventcallback-type-alias.html]]], events: [[[EvEventType|eveventtype-enumeration.html]]][], unregisterTag?: string ): void

Parameters

callback: EvEventCallback

An EvEventCallback object, a given callback function that should be registered for the given type of events that will occur and be broadcast during the current document editing session in the Canvas Envision Creator web app.

events: EvEventType[]

An array of members of the EvEventType enumeration, one or more types of events for which the given callback function should be registered during the current document editing session in the Canvas Envision Creator web app.

unregisterTag?: string

A string, a tag that uniquely identifies the given callback function for the given event types and is passed in the UnregisterCallback(unregisterTag: string): void function to unregister it from the callback for the given event types.

If it is not given, the function is registered until the document editing session ends.

Return value

void

void, a notification that the given callback function has been successfully registered for the given type of events that will occur and be broadcast during the current document editing session in the Canvas Envision Creator web app.

Discussion

Callback functions are registered only for the current document editing session in the Canvas Envision Creator web app. Reloading the document or loading another document clears the callback registry. In such a case, the callback functions should be registered for the new document editing session to continue tracking the events.

29 April 2025