Closed Bug 1501354 Opened 6 years ago Closed 6 years ago

fetch should not block the load event

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: bzbarsky, Assigned: baku)

Details

Attachments

(1 file)

Testcase:

<script>
  onload = () => alert('load fired');
  var x = fetch("http://software.hixie.ch/utilities/cgi/test-tools/delayed-file?pause=4&mime=text%2Fplain&text=abc",
                { mode: "no-cors" });
  x.then((r) => console.log(r), (e) => console.log("FAIL: " + e));
</script>

In Gecko, we block the load event on that load.  Can we make it LOAD_BACKGROUND?  Or do we need to get progress events for these loads?

Neither Chrome nor Safari block the load event here, and the spec doesn't say to do it either.
Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Comment on attachment 9020314 [details] [diff] [review]
fetch_background.patch

r=me
Attachment #9020314 - Flags: review+
oh oh, this could be rather bad for page load. Thanks for fixing.
(though, load blocking XHR seems to be still used way more often)
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ab03a5f49397
Fetch() should not block the loadgroup from completing, r=bz
https://hg.mozilla.org/mozilla-central/rev/ab03a5f49397
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: