interface ICoreWebView2ExperimentalLaunchingExternalUriSchemeEventArgs2

Note

This an experimental API that is shipped with our prerelease SDK. See WebView2 release notes.

interface ICoreWebView2ExperimentalLaunchingExternalUriSchemeEventArgs2
  : public IUnknown

This is a continuation of the ICoreWebView2LaunchingExternalUriSchemeEventArgs interface that adds the Handled property.

Summary

Members Descriptions
get_Handled Gets the Handled property.
put_Handled Indicates whether a CoreWebView2Frame event handler has handled this LaunchingExternalUriScheme event.

The Handled property is set from within an iframe-level LaunchingExternalUriScheme event handler to prevent the webview-level event handlers from being invoked for the same launch.

Applies to

Product Introduced
WebView2 Win32 N/A
WebView2 Win32 Prerelease 1.0.4255

Members

get_Handled

Gets the Handled property.

public HRESULT get_Handled(BOOL * value)

put_Handled

Indicates whether a CoreWebView2Frame event handler has handled this LaunchingExternalUriScheme event.

public HRESULT put_Handled(BOOL value)

Defaults to FALSE.

By default, the LaunchingExternalUriScheme event handlers on the CoreWebView2Frame and the CoreWebView2 are all invoked, with the CoreWebView2Frame event handlers invoked first, innermost frame first for nested iframes. The host may set this flag to TRUE within a CoreWebView2Frame event handler to prevent the remaining ancestor CoreWebView2Frame and CoreWebView2 event handlers from being invoked.

Setting Handled has no effect when the event is raised on CoreWebView2; it only suppresses the remaining handlers when set from a CoreWebView2Frame handler.

If a deferral is taken on the event args, then you must synchronously set Handled to TRUE prior to taking your deferral to prevent the remaining ancestor frame and CoreWebView2 event handlers from being invoked.