CoreWebView2.PostWebMessageAsString(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Posts a message that is a simple string rather than a JSON string representation of a JavaScript object.
public void PostWebMessageAsString (string webMessageAsString);
member this.PostWebMessageAsString : string -> unit
Public Sub PostWebMessageAsString (webMessageAsString As String)
Parameters
- webMessageAsString
- String
The web message to be posted to the top level document in this WebView.
Remarks
This behaves in exactly the same manner as PostWebMessageAsJson(String), but the data
property of the event arg of the window.chrome.webview
message is a string with the same value as webMessageAsString
. Use this instead of PostWebMessageAsJson(String) if you want to communicate using simple strings rather than JSON objects.