Share via

CoreWebView2WebMessageReceivedEventArgs.WebMessageAsJson Property


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


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\""


Run this operation to communicate using JavaScript objects.

Applies to