Skip to content

Commit 7168778

Browse files
authored
docs: reword beforeNavigate description so that it includes navigations to the same URL (#13133)
closes #12863
1 parent 01d2720 commit 7168778

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/kit/src/runtime/client/client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ export function afterNavigate(callback) {
16681668
}
16691669

16701670
/**
1671-
* A navigation interceptor that triggers before we navigate to a new URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.
1671+
* A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.
16721672
*
16731673
* Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.
16741674
*

packages/kit/types/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2051,7 +2051,7 @@ declare module '$app/navigation' {
20512051
* */
20522052
export function afterNavigate(callback: (navigation: import("@sveltejs/kit").AfterNavigate) => void): void;
20532053
/**
2054-
* A navigation interceptor that triggers before we navigate to a new URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.
2054+
* A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.
20552055
*
20562056
* Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.
20572057
*

0 commit comments

Comments
 (0)