Event args for the CoreWebView2.NewWindowRequested event.
|Handled||Indicates whether the CoreWebView2.NewWindowRequested event is handled by host.|
|Name||Gets the name of the new window.|
|NewWindow||Gets the new window or sets a WebView as a result of the new window requested.|
|Uri||Gets the target uri of the new window request.|
|WindowFeatures||Gets the window features specified by the
|GetDeferral||Gets a Deferral object and put the event into a deferred state.|
Indicates whether the CoreWebView2.NewWindowRequested event is handled by host.
If this is
false and no CoreWebView2NewWindowRequestedEventArgs.NewWindow is set, the WebView opens a popup window and it returns as opened WindowProxy. If set to
true and no CoreWebView2NewWindowRequestedEventArgs.NewWindow is set for
window.open(), the opened WindowProxy is for a dummy window object and no window loads. The default value is
readonly bool IsUserInitiated
true when the new window request was initiated through a user gesture such as selecting an anchor tag with target.
The Microsoft Edge popup blocker is disabled for WebView so the app is able to use this flag to block non-user initiated popups.
readonly string Name
Gets the name of the new window.
This window can be created via
window.open(url, windowName), where the windowName parameter corresponds to
If no windowName is passed to
window.open, then the
Name property will be set to an empty string. Additionally, if window is opened through other means, such as
<a target="windowName"> or
<iframe name="windowName">, then the
Name property will be set accordingly. In the case of target=_blank, the
Name property will be an empty string.
Opening a window via Ctrl+clicking a link would result in the
Name property being set to an empty string.
Gets the new window or sets a WebView as a result of the new window requested. Provides a WebView as the target for a window.open() from inside the requesting WebView. If this is set, the top-level window returns as the opened WindowProxy. If this is not set, then CoreWebView2NewWindowRequestedEventArgs.Handled is checked to determine behavior for the CoreWebView2.NewWindowRequested. WebView provided in the NewWindow property must be on the same CoreWebView2Environment as the opener WebView and cannot be navigated. Changes to settings should be made before setting NewWindow to ensure that those settings take effect for the newly setup WebView.
readonly string Uri
Gets the target uri of the new window request.
readonly CoreWebView2WindowFeatures WindowFeatures
Gets the window features specified by the
window.open() call. These features should be considered for positioning and sizing of new WebView windows.
Gets a Deferral object and put the event into a deferred state. Use this to Complete the window open request at a later time. While this event is deferred the opener window returns a WindowProxy to an un-navigated window, which navigates when the deferral is complete.