Share via


CoreWebView2ServiceWorker.PostWebMessageAsString(String) Method

Definition

Posts a message that is a simple string rather than a JSON string representation of a JavaScript object. This behaves exactly the same manner as PostWebMessageAsJson, but the data property of the event arg of the self.chrome.webview message is a string with the same value as webMessageAsString. Use this instead of PostWebMessageAsJson if you want to communicate using simple strings rather than JSON objects. Please see PostWebMessageAsJson for additional information. cpp See also the equivalent methods: `ICoreWebView2::PostWebMessageAsString` `ICoreWebView2Frame::PostWebMessageAsString`, `ICoreWebView2DedicatedWorker::PostWebMessageAsString`.

public void PostWebMessageAsString(string webMessageAsString);
member this.PostWebMessageAsString : string -> unit
Public Sub PostWebMessageAsString (webMessageAsString As String)

Parameters

webMessageAsString
String

Applies to