CoreWebView2.NewWindowRequested Event

Definition

NewWindowRequested is raised when content inside the WebView requests to open a new window, such as through window.open().

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

Event Type

EventHandler<CoreWebView2NewWindowRequestedEventArgs>

Remarks

The app passes a target WebView that is considered the opened window. If a deferral is not taken on the event args, scripts that resulted in the new window that are requested are blocked until the event handler returns. If a deferral is taken, then scripts are blocked until the deferral is completed.

Applies to