I really wish the web had a global navigation event I could cancel. So much router logic is just trying to intercept all nav to do pushState.
@DasSurma @bfgeek @slightlylate
-
-
I must be missing something obvious, but how is this event different from beforeunload or unload?
-
beforeunload is not cancellable so you can't convert it into a pushState. You also don't want the event to fire when closing or directly navigating (ex. If the user edits the address bar).
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.