W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: progress events in sync XHR not entirely ruled out

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 25 Nov 2010 14:27:57 +0100
To: "Eric Uhrhane" <ericu@google.com>
Cc: "WebApps WG" <public-webapps@w3.org>
Message-ID: <op.vmqacvia64w2qv@anne-van-kesterens-macbook-pro.local>
On Wed, 24 Nov 2010 19:54:15 +0100, Eric Uhrhane <ericu@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
Received on Thursday, 25 November 2010 13:28:40 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:28 UTC