Skip to content

Commit 1769490

Browse files
committed
tell people to avoid goto(external) - #8755
1 parent 089c405 commit 1769490

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/kit/types/ambient.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ declare module '$app/navigation' {
170170
export function disableScrollHandling(): void;
171171
/**
172172
* Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.
173+
* For external URLs, use `window.location = url` instead of calling `goto(url)`.
173174
*
174175
* @param url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://kit.svelte.dev/docs/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.
175176
* @param opts Options related to the navigation

0 commit comments

Comments
 (0)