CoreWebView2.WebResourceRequested Event

Definition

WebResourceRequested is raised when the WebView is performing a URL request to a matching URL and resource context filter that was added with AddWebResourceRequestedFilter(String, CoreWebView2WebResourceContext).

public event EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestedEventArgs> WebResourceRequested;
member this.WebResourceRequested : EventHandler<Microsoft.Web.WebView2.Core.CoreWebView2WebResourceRequestedEventArgs> 
Public Custom Event WebResourceRequested As EventHandler(Of CoreWebView2WebResourceRequestedEventArgs) 

Event Type

EventHandler<CoreWebView2WebResourceRequestedEventArgs>

Remarks

At least one filter must be added for the event to be raised. The web resource requested may be blocked until the event handler returns if a deferral is not taken on the event args. If a deferral is taken, then the web resource requested is blocked until the deferral is completed. Currently this only supports file, http, and https URI schemes.

Applies to

See also