-
Notifications
You must be signed in to change notification settings - Fork 157
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
Progress events #69
Comments
Any feedback on this? |
Still haven't looked. You could speed up the process by providing more details about the pros/cons of this change. |
FakeXMLHttpRequest now can send Usually you don't care about progress event, but sometimes I do. I was thinking in check if the request object has an p.e. in a request with 200ms of delay the event, it would be fired each 50ms. Never before the |
Sorry for the insistence, but I'm just waiting some green light to start implementing something. |
I'd still like to hear the pros/cons. I think you've accurately described the situation, but haven't touched on how it might affect people using the library's current behavior. |
I don't think that there is any cons. It's a new feature that should't affect in any form to current users. The options are Intuitively I think that option b) might be simpler to implement and triggering events is cheap enough to not be a concerned about wasting cycles. But in any case it's an implementation detail, the final result for the developer listening for progress events will be identical. |
Wouldn't we keep triggering events every 50ms, even after a test has finished running, whether you were using them or not? That seems like a high likelihood of ending up with test leaks? |
According to the XHR2 specification (https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#make-progress-notifications):
How do you feel about pretender triggering that event each 50ms by default? If nobody is listening, it's ok. Alternatively you can trigger only if there is an "onprogress" handler attached to the relevan object.
The text was updated successfully, but these errors were encountered: