-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: better iframe navigation #193
base: main
Are you sure you want to change the base?
Conversation
- uses postMessage to trigger the inner SvelteKit's goto method - monkeypatches iframe's history.pushState to use replaceState instead to not create history entries, keeping the parent window's navigation order intact
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This will break any tutorials that involve |
(I think we should undo #181 and work on this at leisure, rather than leaving the current UI in place any longer) |
What do you mean by |
In |
Ah I see. We could
I don't think that should hold us back though, since without this feature there wouldn't even be a way to trigger the |
@dummdidumm @Rich-Harris Another idea could be to allow the iframe state to work naturally until we see some movement on whatwg/html#6501. That meaning, we could mesh the iframe history with the window's history and have window preserve the iframe state by storing the iframe's current path in a URL param, like…
That way, it's not so much pollution as it is standard history tracking where there are no redundant polluted entries, but a bunch of unique entries that are all meaningful when they occur. |
alternative to #187 which keeps the back/fwd navigation while also fixing the weird history pollution from iframe to parent (which was there regardless of the back/fwd navigation feature)