CoreWebView2ServiceWorker.WebMessageReceived Event
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.
Add an event handler for the WebMessageReceived event.
WebMessageReceived is fired, when the
ICoreWebView2Settings::IsWebMessageEnabled setting is set TRUE and the
worker runs self.chrome.webview.postMessage. The postMessage function
is void postMessage(object) where object is any object supported by JSON
conversion.
If the worker calls `postMessage` multiple times, the corresponding
`WebMessageReceived` events are guaranteed to be fired in the same order.
public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs> WebMessageReceived;
member this.WebMessageReceived : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2WebMessageReceivedEventArgs>
Public Custom Event WebMessageReceived As EventHandler(Of CoreWebView2WebMessageReceivedEventArgs)