Skip to content

PostWebMessageAsJsonHandle - cWebView2Browser

Posts a message to the document loaded inside the WebView2 control

Type: Procedure

Parameters

Parameter Type Description
hoJson Handle Handle of a cJsonObject instance

Syntax

Procedure PostWebMessageAsJsonHandle Handle hoJson

Call Example

Send PostWebMessageAsJsonHandle hoJson

Description

Posts a message to the document loaded inside the WebView2 control.

This message can be handled using JavaScript. The event data in JavaScript will be the parsed JSON.

This procedure behaves the same as PostWebMessageAsJson, except that it needs to be called with a cJsonObject handle instead of a String.

Note that the caller is still responsible for destroying the JSON object.