Partilhar via


CoreWebView2NewWindowRequestedEventArgs Class

Definition

Event args for the NewWindowRequested event.

public class CoreWebView2NewWindowRequestedEventArgs
public class CoreWebView2NewWindowRequestedEventArgs : EventArgs
public class CoreWebView2NewWindowRequestedEventArgs : System.ComponentModel.HandledEventArgs
type CoreWebView2NewWindowRequestedEventArgs = class
type CoreWebView2NewWindowRequestedEventArgs = class
    inherit EventArgs
type CoreWebView2NewWindowRequestedEventArgs = class
    inherit HandledEventArgs
Public Class CoreWebView2NewWindowRequestedEventArgs
Public Class CoreWebView2NewWindowRequestedEventArgs
Inherits EventArgs
Public Class CoreWebView2NewWindowRequestedEventArgs
Inherits HandledEventArgs
Inheritance
CoreWebView2NewWindowRequestedEventArgs
Inheritance
CoreWebView2NewWindowRequestedEventArgs
Inheritance
CoreWebView2NewWindowRequestedEventArgs

Remarks

The event is fired when content inside WebView requested to a open a new window (through window.open() and so on.)

Properties

Handled

Indicates whether the NewWindowRequested event is handled by host.

IsUserInitiated

true when the new window request was initiated through a user gesture such as selecting an anchor tag with target.

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.

OriginalSourceFrameInfo

The frame info of the frame where the new window request originated. The OriginalSourceFrameInfo is a snapshot of frame information at the time when the new window was requested.

        See <xref data-throw-if-not-resolved="true" uid="Microsoft.Web.WebView2.Core.CoreWebView2FrameInfo"></xref> for details on frame properties.
Uri

Gets the target uri of the new window request.

WindowFeatures

Gets the window features specified by the window.open() call. These features should be considered for positioning and sizing of new WebView windows.

Methods

GetDeferral()

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.

Applies to