Open
Description
I just ran into an issue where readystatechange being async caused some trouble. Specifically:
- The XHR changed to readystate 2, then 3, then 4.
- As a result, 3 callbacks got enqueued
- Then, all 3 callbacks got processed
- Since the readystate had already changed to 4, all 3 callbacks saw readystate 4, and all 4 reported that the XHR had just finished.
This behavior doesn't seem right, but I'm not clear on how the decision ought to be made between sync and async for this sort of thing.
Metadata
Assignees
Labels
No labels