Open bzbarsky opened 7 years ago
I believe this is a dupe of https://github.com/whatwg/html/issues/1896, which I tried to solve in https://github.com/whatwg/html/pull/1904 but got stuck on.
No, this is not the same issue. This isn't about "when does the javascript: thing lead to a new document?". This is about "do fetches get canceled when a javascript: navigation does NOT lead to a new document?"
Test and analysis for this issue in https://github.com/w3c/web-platform-tests/pull/9501
So to be able to determine if fetches etc should be aborted, we need to reach step 12, substep If resource is a request whose url's scheme is "javascript"
's substep 12:
Process result: If Type(result) is not String, then set response to a response whose status is 204.
(which is in a task)
...before navigate's step 6.
Cancel any preexisting but not yet mature attempt to navigate browsingContext, including canceling any instances of the fetch algorithm started by those attempts. [...]
Right?
What Gecko implements is that step 6 is skipped if the scheme is javascript:, iirc.
Per spec, https://html.spec.whatwg.org/#navigate step 8 aborts all fetches, even when the navigation is to javascript:.
That's not web-compatible, last I checked. Certainly Gecko has an explicit "don't cancel fetches for javascript:" thing; they only get canceled if the javascript: in fact returns a string.