Skip to content

Latest commit

 

History

History
83 lines (51 loc) · 3.24 KB

icorewebview2launchingexternalurischemeeventargs.md

File metadata and controls

83 lines (51 loc) · 3.24 KB
description title ms.date keywords
Event args for `LaunchingExternalUriScheme` event.
WebView2 Win32 C++ ICoreWebView2LaunchingExternalUriSchemeEventArgs
07/24/2023
IWebView2, IWebView2WebView, webview2, webview, win32 apps, win32, edge, ICoreWebView2, ICoreWebView2Controller, browser control, edge html, ICoreWebView2LaunchingExternalUriSchemeEventArgs

interface ICoreWebView2LaunchingExternalUriSchemeEventArgs

[!INCLUDE deprecation-note]

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)