Table of Contents

Class CoreWebView2LaunchingExternalUriSchemeEventArgs

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

Event args for the LaunchingExternalUriScheme event.

public class CoreWebView2LaunchingExternalUriSchemeEventArgs : EventArgs
Inheritance
CoreWebView2LaunchingExternalUriSchemeEventArgs
Inherited Members

Properties

Cancel

Determines whether to cancel the navigation.

public bool Cancel { get; set; }

Property Value

bool

InitiatingOrigin

Gets the origin initiating the external URI scheme launch. If the InitiatingOrigin is opaque, the InitiatingOrigin reported in the event args will be its precursor origin. The precursor origin is the origin that created the opaque origin. For example, if a frame on example.com opens a subframe with a different opaque origin, the subframe's precursor origin is example.com.

public string InitiatingOrigin { get; }

Property Value

string

Remarks

The origin will be an empty string if the request is initiated by calling Navigate(string) on the external URI scheme. If a script initiates the navigation, the InitiatingOrigin will be the top-level document's Source, i.e. if window.location is set to "calculator://", the InitiatingOriginwill be set tocalculator://. If the request is initiated from a child frame, the InitiatingOrigin` will be the source of that child frame.

IsUserInitiated

true when the launching external URI scheme request was initiated through a user gesture.

public bool IsUserInitiated { get; }

Property Value

bool

Uri

Gets the URI with the external URI scheme to be launched.

public string Uri { get; }

Property Value

string

Methods

GetDeferral()

Gets a CoreWebView2Deferral object and put the event into a deferred state.

public CoreWebView2Deferral GetDeferral()

Returns

CoreWebView2Deferral

Remarks

Use this to Complete() the launching external URI scheme request at a later time.