ScriptMessageHandler QML Type

A handler for messages from user scripts More...

Import Statement: import com.canonical.Oxide 1.15
Instantiates: OxideQQuickScriptMessageHandler

Properties

Detailed Description

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.

Property Documentation

callback : value

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.


msgId : string

Specify the ID of the messages to handle.