Spec requires firing at least two "progress" events; browsers do not.
domenic opened this issue · 1 comments
Example: https://boom-bath.glitch.me/xhr-small-chunks.html
The spec requires firing one as part of processResponse, and one as part of "handle response end-of-file". However, browsers only fire a single one.
As far as I can tell, they avoid firing the one in "handle response end-of-file" if the number of bytes hasn't changed. /cc @ricea in case he can make more sense of Chromium's implementation than I can.
Implementing a change in jsdom to omit the progress event revealed another non-interop, which is for zero-length response bodies: there only Firefox fires a progress event: https://wpt.fyi/results/xhr/send-no-response-event-order.htm?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned&q=send-no-response-event