[whatwg/xhr] The spec needs to reflect legacy behavior for firing multiple LOADING readystatechanges. (#92)

Recently, Firefox tried to remove support for firing multiple readystatechange events during the LOADING phase (a legacy mechanism to detect request progress and do request polling). Unfortunately, this broke Google Hangouts and some Etherpad-based sites, so the change was reverted:
  - bug for removal:     https://bugzilla.mozilla.org/show_bug.cgi?id=918719
  - bug for re-addition: https://bugzilla.mozilla.org/show_bug.cgi?id=1304067

Since it turns out that browsers do still support this behavior (contrary to passing the related web platform test), and sites still rely on the behavior, the spec should be changed accordingly. That is, the spec currently states this in the send() method section "To process response for response, run these subsubsteps":

  3. If state is headers received, then set state to loading and fire an event named readystatechange.

What browsers are actually doing is this:

  3. If state is headers received, then set state to loading.
  4. Fire an event named readystatechange.

It would presumably also be worth adding a note explaining that firing multiple readystatechanges during the LOADING phase is legacy behavior that is still used by some apps developed before the ProgressEvents spec became widespread.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/92

Received on Tuesday, 27 September 2016 20:27:02 UTC