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 3 Manual
Construct.net
2024-05-15
2024-05-15
You are here:
Search this manual:
This manual entry was last updated on 15 May, 2024 at 16:00