Skip to content

Conversation

dummdidumm
Copy link
Member

closes #479 - beforeUnload was too late in my testing, and the use case is a real edge case anyway

closes #479 - beforeUnload was too late in my testing, and the use case is a real edge case anyway
Copy link

vercel bot commented Oct 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
omnisite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 22, 2024 3:43pm

@Rich-Harris
Copy link
Member

What if we updated it a) on body mouseleave and b) on Cmd-R or Ctrl-R keydown events? 5 seconds is a long time, and if it sometimes saves your work and sometimes doesn't it'll feel non-deterministic and unreliable

@Conduitry
Copy link
Member

Is beforeUnload too late because we need to do async stuff during it to retrieve and encode all the REPL tabs? Or is it just too late because we can't change the URL hash anymore at that point? If it's only the latter, what about a very short-lived sessionStorage value that we read after the reload and perform the replaceState then?

@Rich-Harris
Copy link
Member

merged #631 so will close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Playground hash should be updated before reload

3 participants