Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec requires firing at least two "progress" events; browsers do not. #318

Open
domenic opened this issue Mar 6, 2021 · 1 comment
Open

Comments

@domenic
Copy link
Member

domenic commented Mar 6, 2021

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.

domenic added a commit to jsdom/jsdom that referenced this issue Mar 6, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 6, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
@domenic
Copy link
Member Author

domenic commented Mar 6, 2021

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

domenic added a commit to jsdom/jsdom that referenced this issue Mar 6, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 6, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 6, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 7, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 7, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
domenic added a commit to jsdom/jsdom that referenced this issue Mar 7, 2021
See whatwg/xhr#318. This fixes a broken web platform test which happens to pass in all browsers, to also happen to pass in jsdom: web-platform-tests/wpt#27917.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant