Web View2.Web Resource Requested Event
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.
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)
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.
If this event is subscribed in the NewWindowRequested handler it should be called after the new window is set. For more details see NewWindow.
Currently this only supports file, http, and https URI schemes.