Share via


WebView2.WebMessageReceived Event

Definition

Occurs when a new HTML document is loaded.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

// Register
event_token WebMessageReceived(TypedEventHandler<WebView2, CoreWebView2WebMessageReceivedEventArgs const&> const& handler) const;

// Revoke with event_token
void WebMessageReceived(event_token const* cookie) const;

// Revoke with event_revoker
WebView2::WebMessageReceived_revoker WebMessageReceived(auto_revoke_t, TypedEventHandler<WebView2, CoreWebView2WebMessageReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<WebView2,CoreWebView2WebMessageReceivedEventArgs> WebMessageReceived;
Public Custom Event WebMessageReceived As TypedEventHandler(Of WebView2, CoreWebView2WebMessageReceivedEventArgs) 

Event Type

Applies to