Skip to content

Commit

Permalink
tell people to avoid goto(external) - #8755
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Feb 1, 2023
1 parent 089c405 commit 1769490
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/kit/types/ambient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ declare module '$app/navigation' {
export function disableScrollHandling(): void;
/**
* Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.
* For external URLs, use `window.location = url` instead of calling `goto(url)`.
*
* @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.
* @param opts Options related to the navigation
Expand Down

0 comments on commit 1769490

Please sign in to comment.