You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/LaunchingRegisteredProtocols.md
+43-42Lines changed: 43 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,20 @@
1
1
# Background
2
2
3
-
We are exposing an event that will be raised when an attempt to launch a protocol that is registered with the OS (external protocol) is made. The host will be given the option to cancel the launch. Cancelling the launch gives the host the opportunity to hide the default dialog, display a custom dialog, and then launch the external protocol themselves.
3
+
We are exposing an event that will be raised when an attempt to launch a protocol that is registered with the OS (external protocol) is made.
4
+
When navigating to a URI, the URI scheme determines how to handle the URI.
5
+
Some schemes like http, and https, are resolved by WebView2 and the navigation is handled in the WebView2.
6
+
Other URI schemes may be registered externally to the WebView2 with the OS by other applications.
7
+
Such schemes are external protocols and are handled by launching the registered application with the URI.
8
+
9
+
The host will be given the option to cancel the external protocol launch with the `LaunchingExternalProtocol` event.
10
+
Cancelling the launch gives the host the opportunity to hide the default dialog, display a custom dialog, and then launch the external protocol themselves.
4
11
5
12
# Description
6
13
7
-
This event will be raised before the external protocol launch occurs. When an attempt to launch an external protocol is made, the default dialog is displayed in which the user can select `Open` or `Cancel` if the host does not cancel the event. The `NavigationStarting` event will be raised before the `LaunchingExternalProtocol` event, followed by the `NavigationCompleted` event. The `SourceChanged`, `ContentLoading`, and `HistoryChanged` events will not be raised when a request is made to launch an external protocol.
14
+
This event will be raised before the external protocol launch occurs.
15
+
When an attempt to launch an external protocol is made, the default dialog is displayed in which the user can select `Open` or `Cancel` if the host does not cancel the event.
16
+
The `NavigationStarting` event will be raised before the `LaunchingExternalProtocol` event, followed by the `NavigationCompleted` event.
17
+
The `SourceChanged`, `ContentLoading`, and `HistoryChanged` events will not be raised when a request is made to launch an external protocol.
8
18
9
19
The `LaunchingExternalProtocol` event will be raised on the `CoreWebView2` interface.
0 commit comments