ScriptMessage QML Type

A JS message sent from a user script More...

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

Properties

Methods

Detailed Description

ScriptMessage represents a JS message sent from a user script. It provides various details about the message such as the source WebFrame (frame), the ID of the source JS context (context) and the message ID (msgId).

The message payload is provided by payload.

The application can choose to reply to this message by calling reply.

Property Documentation

context : url

The ID of the JS context that this message was sent from.


frame : WebFrame

The WebFrame representing the frame that this message was sent from.


msgId : string

The ID of this message.


payload : variant

The message payload. The format is defined by the application.

This QML property was introduced in OxideQt 1.9.


Method Documentation

void reply(variant payload)

Reply to this message, responding with the provided payload. payload must be a value, object or array that can be represented by JSON values.

This is ignored if the message isn't expecting a reply.