-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defer pushState until navigation succeeds (#4070)
* defer pushState until navigation completes * fix test, simplify clicknav implementation * remove now-obsolete sveltekit:navigation-{start,end} events * changesets * Update .changeset/little-geckos-smell.md Co-authored-by: Ignatius Bagus <[email protected]> * Update documentation/docs/08-events.md Co-authored-by: Ignatius Bagus <[email protected]> * make navigation abortable * sigh. lint * ugh come on * Update packages/kit/src/runtime/client/router.js Co-authored-by: Maurício Kishi <[email protected]> * belt and braces * ugh * changeset * for the love of * use pushState for redirects Co-authored-by: Ignatius Bagus <[email protected]> Co-authored-by: Maurício Kishi <[email protected]>
- Loading branch information
1 parent
3f5d7bd
commit fd8bca9
Showing
15 changed files
with
90 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
[breaking] referer header sent by fetch in load matches page's referer header, not the page itself |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
[breaking] remove sveltekit:navigation-{start,end} events |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/kit': patch | ||
--- | ||
|
||
[breaking] defer pushState until navigation occurs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
packages/kit/test/apps/basics/src/routes/routing/cancellation/__layout.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<slot></slot> | ||
|
||
<a href="/routing/cancellation/a">a</a> | ||
<a href="/routing/cancellation/b">b</a> |
17 changes: 17 additions & 0 deletions
17
packages/kit/test/apps/basics/src/routes/routing/cancellation/a.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script context="module"> | ||
import { browser } from '$app/env'; | ||
/** @type {import('@sveltejs/kit').Load} */ | ||
export async function load() { | ||
if (browser) { | ||
await new Promise(f => { | ||
window.fulfil_navigation = f; | ||
}); | ||
} | ||
return {}; | ||
} | ||
</script> | ||
|
||
<h1>this should not appear</h1> |
1 change: 1 addition & 0 deletions
1
packages/kit/test/apps/basics/src/routes/routing/cancellation/b.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>b</h1> |
1 change: 1 addition & 0 deletions
1
packages/kit/test/apps/basics/src/routes/routing/cancellation/index.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>cancellation</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters