Compartilhar via


interface ICoreWebView2LaunchingExternalUriSchemeEventArgs

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

interface ICoreWebView2LaunchingExternalUriSchemeEventArgs
  : public IUnknown

Event args for LaunchingExternalUriScheme event.

Summary

Members Descriptions
get_Cancel The event handler may set this property to TRUE to cancel the external URI scheme launch.
get_InitiatingOrigin The origin initiating the external URI scheme launch.
get_IsUserInitiated TRUE when the external URI scheme request was initiated through a user gesture.
get_Uri The URI with the external URI scheme to be launched.
GetDeferral Returns an ICoreWebView2Deferral object.
put_Cancel Sets the Cancel property.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease

Members

get_Cancel

The event handler may set this property to TRUE to cancel the external URI scheme launch.

public HRESULT get_Cancel(BOOL * value)

If set to TRUE, the external URI scheme will not be launched, and the default dialog is not displayed. This property can be used to replace the normal handling of launching an external URI scheme. The initial value of the Cancel property is FALSE.

get_InitiatingOrigin

The origin initiating the external URI scheme launch.

public HRESULT get_InitiatingOrigin(LPWSTR * value)

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

get_IsUserInitiated

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

public HRESULT get_IsUserInitiated(BOOL * value)

Note

Being initiated through a user gesture does not mean that user intended to access the associated resource.

get_Uri

The URI with the external URI scheme to be launched.

public HRESULT get_Uri(LPWSTR * value)

GetDeferral

Returns an ICoreWebView2Deferral object.

public HRESULT GetDeferral(ICoreWebView2Deferral ** value)

Use this operation to complete the event at a later time.

put_Cancel

Sets the Cancel property.

public HRESULT put_Cancel(BOOL value)