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
2
1
1
29
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 @wanderview
4
19
I would like to subscribe to your newsletter.
1
8
I might prototype such an event. Hey @davidbaron, who's the best Mozilla person to rope into this discussion?
2
7
Probably @bz_moz or someone he delegates to.

Oct 14, 2018 · 3:33 AM UTC

1
1
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