A handler for messages from user scripts More...
Import Statement: | import com.canonical.Oxide 1.15 |
Instantiates: | OxideQQuickScriptMessageHandler |
ScriptMessageHandler is a handler for JS messages sent from user scripts. The handler will intercept messages with the specified msgId, from JS contexts with URLs listed in contexts.
Incoming messages will be passed to the application provided callback.
Specify a JS callback that will be called when an incoming message is received. The callback will be called with a single argument - a ScriptMessage instance whose ownership will be transferred to the callback.
contexts : list<url> |
Specify a list of JS contexts from which to handle messages.