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 also loathe the history API. Who was the customer this was designed with? Oy. We discussed such an event a part of the Service Worker design; it has to be scoped to origin, but can work. It'd be something sent before `onbeforeunload`. /cc
@jaffathecake@wanderview4 replies 0 retweets 18 likes -
Replying to @slightlylate @ElliottZ and
I would like to subscribe to your newsletter.
1 reply 0 retweets 8 likes -
Replying to @NellWaliczek @ElliottZ and
I might prototype such an event. Hey
@davidbaron, who's the best Mozilla person to rope into this discussion?2 replies 0 retweets 7 likes -
Replying to @slightlylate @NellWaliczek and
Probably
@bz_moz or someone he delegates to.1 reply 0 retweets 1 like -
Replying to @davidbaron @slightlylate and
smaug might also be good for this. In general, sending an event when navigation starts to the same origin as the currently loaded origin doesn't seem like a problem to me. There are issues to sort out wrt named targeting and whatnot, reentrancy, etc, etc.
1 reply 0 retweets 0 likes -
Replying to @really_bz @bz_moz and
Would sending an event for cross origin navigations be a problem?
1 reply 0 retweets 0 likes -
Replying to @jaffathecake @davidbaron and
There are issues. Certainly for cross-origin navigations using the browser UI you would not want to expose the URL in the event (something that I expect people want for the pushState use case described above) and you would not want to allow canceling either.
2 replies 0 retweets 1 like
If the cross-origin navigation is caused by the page itself maybe we could do the event thing. Needs some thought.
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.