Skip to content

Commit f0a5556

Browse files
author
Maura Winstanley
committed
Fix syntax / typos
1 parent 9df00f8 commit f0a5556

1 file changed

Lines changed: 16 additions & 18 deletions

File tree

specs/LaunchingRegisteredProtocols.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Background
22

3-
We are exposing an event that will fire when an attempt to launch a registered protocol is made. This event will fire when this attempt is made and the host will be given the option to cancel the launch, handle the popup dialog to hide the dialog, as well as revoke permissions that have been previously given to the origin launching the protocol.
3+
We are exposing an event that will fire when an attempt to launch a registered protocol is made. The host will be given the option to cancel the launch, handle the popup dialog to hide the dialog, as well as revoke permissions that have been previously given to the origin launching the protocol.
44

55
# Description
66

7-
This event will fire before the registered protocol launch occurs. Currently a popup dialog is displayed in which the user can click `Open` or `Cancel`. If the request is made from a trustworthy origin a checkmark box will be displayed that will allow the user to check to always allow this registered protocol from this origin. This event will allow the host to programatically cancel the event, suppress the popup dialog, and revoke permissions given in the past to always allow the protocol from the origin.
7+
This event will fire before the registered protocol launch occurs. Currently a popup dialog is displayed in which the user can click `Open` or `Cancel`. If the request is made from a trustworthy origin a checkmark box will be displayed that will allow the user to always allow this registered protocol from this origin.
88

9-
There are two events associated with the registered protocol launch - one for the main frame, and one for non-main frame(s). In this case in which the launch request is made from a non-main frame, the frame will raise a `LaunchingRegisteredProtocol` event as well as `CoreWebView2.FrameLaunchingRegisteredProtocol` event.
9+
There are two events associated with the registered protocol launch - one for the main frame, and one for non-main frame(s). In the case in which the launch request is made from a non-main frame, the frame will raise a `LaunchingRegisteredProtocol` event as well as `CoreWebView2.FrameLaunchingRegisteredProtocol` event.
1010
# Examples
1111

1212
## Win32 C++
@@ -30,7 +30,7 @@ CHECK_FAILURE(m_webView->add_LaunchingRegisteredProtocol(
3030
{
3131
CHECK_FAILURE(args->put_Handled(FALSE));
3232
// Otherwise allow the popup dialog, and allow the user to decide
33-
// whether or not to allow the external app to launch.
33+
// whether or not to allow the protocol to launch.
3434
}
3535
return S_OK;
3636
})
@@ -54,7 +54,7 @@ CHECK_FAILURE(frame->add_LaunchingRegisteredProtocol(
5454
{
5555
// Otherwise revoke permissions previously granted to this protocol
5656
// from this origin. This will trigger the dialog to appear to allow the user
57-
// to confirm the protocol launch.
57+
// to confirm or deny the protocol launch.
5858
CHECK_FAILURE(args->put_RevokeProtocolPermissionsPerOrigin(TRUE));
5959
}
6060
return S_OK;
@@ -78,7 +78,7 @@ void WebView_LaunchingRegisteredProtocol(object target, CoreWebView2LaunchingReg
7878
else
7979
{
8080
// Otherwise allow the popup dialog, and allow the user to decide
81-
// whether or not to allow the registered protocol to launch.
81+
// whether or not to allow the protocol to launch.
8282
e.Handled = false;
8383
}
8484
webView.CoreWebView2.FrameCreated += (sender, args) =>
@@ -95,7 +95,7 @@ void WebView_LaunchingRegisteredProtocol(object target, CoreWebView2LaunchingReg
9595
{
9696
// Otherwise revoke permissions previously granted to this protocol
9797
// from this origin. This will trigger the dialog to appear to allow the user
98-
// to confirm the protocol launch.
98+
// to confirm or deny the protocol launch.
9999
e.RevokeProtocolPermissionsPerOrigin = true;
100100
}
101101
};
@@ -127,8 +127,7 @@ interface ICoreWebView2Frame3 : IUnknown {
127127
/// decide if the frame launch registered protocol request will be cancelled.
128128
/// Whichever event handler is last to change the
129129
/// `LaunchingRegisteredProtocolEventArgs.Handled` property will decide if
130-
/// the frame external protocol dialog will be suppressed.
131-
/// Whichever event handler is last to change the
130+
/// the dialog will be suppressed. Whichever event handler is last to change the
132131
/// `LaunchingRegisteredProtocolEventArgs.RevokeProtocolPermissionsPerOrigin`
133132
/// property will determine if the permissions for that origin per protocol
134133
/// will be revoked.
@@ -163,26 +162,25 @@ interface ICoreWebView2FrameLaunchingRegisteredProtocolEventHandler: IUnknown {
163162
/// Event args for `LaunchingRegisteredProtocol` event.
164163
[uuid(fc43b557-9713-4a67-af8d-a76ef3a206e8), object, pointer_default(unique)]
165164
interface ICoreWebView2LaunchingRegisteredProtocolEventArgs: IUnknown {
166-
/// The uri of the requested app protocol.
165+
/// The uri of the requested protocol.
167166
168167
[propget] HRESULT Uri([out, retval] LPWSTR* uri);
169168
170-
/// The host may set this flag to cancel the external app launch. If set to
171-
/// `TRUE`, the external app will not be launched, but the
172-
/// `NavigationCompleted` event will still fire. If cancelled, the external
173-
/// protocol dialog is not displayed regardless of the `Handled` property.
169+
/// The host may set this flag to cancel the protocol launch. If set to
170+
/// `TRUE`, the protocol will not be launched, but the
171+
/// `NavigationCompleted` event will still fire. If cancelled, the
172+
/// dialog is not displayed regardless of the `Handled` property.
174173
175174
[propget] HRESULT Cancel([out, retval] BOOL* cancel);
176175
177176
/// Sets the `Cancel` property.
178177
179178
[propput] HRESULT Cancel([in] BOOL cancel);
180179
181-
/// The host may set this flag to `TRUE` to hide the default external
182-
/// protocol dialog for this navigation if it is a registered app protocol.
183-
/// The external app protocol request will continue as normal if it is not
180+
/// The host may set this flag to `TRUE` to hide the dialog.
181+
/// The protocol request will continue as normal if it is not
184182
/// cancelled, although there will be no default UI shown. By default the
185-
/// value is `FALSE` and the default external protocol dialog is shown.
183+
/// value is `FALSE` and the default registered protocol dialog is shown.
186184
187185
[propget] HRESULT Handled([out, retval] BOOL* handled);
188186

0 commit comments

Comments
 (0)