CoreWebView2WebMessageReceivedEventArgs.WebMessageAsJson Property
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.
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.