WebMessageReceived

Description

Occurs when a message sent by JavaScript on the web is received.

You can send a message from Web (JavaScript) to the PowerBuilder application (PowerScript) by executing the following JavaScript on the web:

window.chrome.webview.postMessage(`SetTitleText ${titleText.value}`); 

Or

window.webBrowser.postMessage(`SetTitleText ${titleText.value}`);

Syntax

WebMessageReceived (string uri, boolean isJson, string webmessage)

Event ID

Event ID

Objects

None

Webbrowser controls

Arguments

Argument

Description

uri

The URI of the DOM webpage that sends this message.

isJson

Whether the message is in the JSON format.

TRUE indicates that the message is in the JSON format; FALSE indicates the message is not in the JSON format.

webmessage

The received message, which can be in the JSON format or a string.


Return Values

None

See also

IsDefaultDownloadDialogStateChanged