Disallow navigations in the unload handler.
Interoperability and Compatibility Risk
When navigating away, Firefox ignores the navigation in the unload handler. Edge adds the navigation to the history, but continues to commit original navigation. Safari aborts the navigation. Chrome currently aborts the navigation the first time the frame is navigating, but commits the second time.
With the proposed change, blink would have the same behavior as Firefox, and be closer to Edge. Overall I think the risk is very low.
Ongoing technical constraints
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
OWP launch tracking bug
Requesting approval to ship?
I think it's worth clarifying Chrome's current behavior here, since I think only in-page navigations are allowed today. Can you confirm if I'm correct about the cases below?1) Cross-document navigations during unload.I think these are always blocked in Chrome, whether cross-origin or not, right?
2) In-page navigations (fragments, pushState, etc) during unload.I think Chrome allows these to interrupt the user's attempted navigation, as long as the attempted navigation is same-process. (Your comment about them not working a second time doesn't apply if you assign the unload handler again.) If the attempted navigation is cross-process, we may have some internal bugs.
Thanks for the detailed discussion. Sounds low risk to me, but to help quantify it (and mitigate the risk some developer is actually relying on this) perhaps it makes sense to add a use counter with deprecation message for one milestone? WDYT?
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.