Skip to content

Commit ff47bce

Browse files
authored
Update DisableNavigatingBackAndForward.md
use line breaks to avoid horizontal scrolling and update enum name
1 parent 4b251ea commit ff47bce

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

specs/DisableNavigatingBackAndForward.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ CHECK_FAILURE(m_webView->add_NavigationStarting(
3737
COREWEBVIEW2_NAVIGATION_KIND kind;
3838
CHECK_FAILURE(args3->get_NavigationKind(&kind));
3939
// disable navigation if it is back/forward
40-
if (kind == COREWEBVIEW2_NAVIGATION_KIND_BACKORFORWARD)
40+
if (kind == COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD)
4141
{
4242
CHECK_FAILURE(args->put_Cancel(true));
4343
}
@@ -73,12 +73,18 @@ void WebView_NavigationStarting(object sender, CoreWebView2NavigationStartingEve
7373
// Enums and structs
7474
[v1_enum]
7575
typedef enum COREWEBVIEW2_NAVIGATION_KIND {
76-
/// A navigation caused by CoreWebView2.Reload(), location.reload(), the end user using F5 or other UX, or other reload mechanisms to reload the current document without modifying the navigation history.
76+
/// A navigation caused by CoreWebView2.Reload(), location.reload(), the end user
77+
/// using F5 or other UX, or other reload mechanisms to reload the current document
78+
/// without modifying the navigation history.
7779
COREWEBVIEW2_NAVIGATION_KIND_RELOAD,
78-
/// A navigation back or forward to a different entry in the session navigation history. For example via CoreWebView2.Back(), location.back(), the end user pressing Alt+Left or other UX, or other mechanisms to navigate forward or backward in the current session navigation history.
79-
COREWEBVIEW2_NAVIGATION_KIND_BACKORFORWARD,
80-
/// A navigation to a different document. This can be caused by CoreWebView2.Navigate(), window.location.href = '...', or other WebView2 or DOM APIs that navigate to a specific URI.
81-
COREWEBVIEW2_NAVIGATION_KIND_DIFFERENT,
80+
/// A navigation back or forward to a different entry in the session navigation history.
81+
/// For example via CoreWebView2.Back(), location.back(), the end user pressing Alt+Left
82+
/// or other UX, or other mechanisms to navigate forward or backward in the current
83+
/// session navigation history.
84+
COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD,
85+
/// A navigation to a different document. This can be caused by CoreWebView2.Navigate(),
86+
/// window.location.href = '...', or other WebView2 or DOM APIs that navigate to a specific URI.
87+
COREWEBVIEW2_NAVIGATION_KIND_DIFFERENT_DOCUMENT,
8288
} COREWEBVIEW2_NAVIGATION_KIND;
8389

8490
/// Extend `NavigationStartingEventArgs` by adding more information.
@@ -101,7 +107,7 @@ namespace Microsoft.Web.WebView2.Core
101107
{
102108
Reload = 0,
103109
BackOrForward = 1,
104-
Different = 2,
110+
DifferentDocument = 2,
105111
};
106112
// ..
107113
runtimeclass CoreWebView2NavigationStartingEventArgs

0 commit comments

Comments
 (0)