ISDKDOMPluginBase addon SDK interface

The ISDKDOMPluginBase interface is used in the runtime as a base class for DOM plugins (that create a HTML element) in the addon SDK. It derives from ISDKPluginBase.

ISDKDOMPluginBase APIs

_addElementMessageHandler(handler, func)
_addElementMessageHandlers(arr)
Add a message handler to receive messages posted by PostToRuntimeElement() in DOMElementHandler. handler must match the string passed to PostToRuntimeElement(). func accepts two arguments: the associated instance, and an optional object with extra details passed to PostToRuntimeElement(). Typically this function just forwards the handler to an instance method, e.g. this._addElementMessageHandler("click", (inst, e) => inst._onClick(e));. The _addElementMessageHandlers variant accepts an array of [handler, callback] which is convenient when adding multiple handlers.
Construct Animate Manual 2024-05-15

On this page