Partilhar via


CoreWebView2WebMessageReceivedEventArgs.WebMessageAsJson Property

Definition

Gets the message posted from the WebView content to the host converted to a JSON string.

public string WebMessageAsJson { get; }
member this.WebMessageAsJson : string
Public ReadOnly Property WebMessageAsJson As String

Property Value

Examples

For example, the following postMessage runs result in the following WebMessageAsJson values:

postMessage({'a': 'b'})      "{\"a\": \"b\"}"
postMessage(1.2)             "1.2"
postMessage('example')       "\"example\""

Remarks

Run this operation to communicate using JavaScript objects.

Applies to