On Wed, 24 Nov 2010 19:54:15 +0100, Eric Uhrhane <er...@google.com> wrote:
In the XHR2 spec, most references to progress events make it clear
that they're only sent for asynchronous XHRs.  However, in three
cases, the events aren't written as being exclusive to the async case.
 I'm guessing these are just oversights:

1) http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#cross-origin-request-event-rules:

"The cross-origin request event rules are as follows:

If the cross-origin request status is preflight complete
Make upload progress notifications."

This seems like a problem that should be fixed.


2) http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#switch-done:

"When it is said to switch to the DONE state run these steps:
1. If the asynchronous flag is false update the response entity body.
2. Switch the state to DONE.
3. Dispatch a readystatechange event.
4. Dispatch a progress event called load.
5. Dispatch a progress event called loadend."

I think it makes sense to dispatch the events here. readystatechange should also fire after a synchronous send() call ended successfully. Why not dispatch load and loadend too?


3) http://dev.w3.org/2006/webapi/XMLHttpRequest-2/#the-abort-method

However, if #1 and #2 are fixed, then there's no way to call the abort
method on a sync XHR anyway.

The send() flag would also not be false.


--
Anne van Kesteren
http://annevankesteren.nl/

Reply via email to