W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: [XHR2] Comments on the 7 September working draft

From: Anne van Kesteren <annevk@opera.com>
Date: Mon, 27 Sep 2010 15:33:18 +0200
To: "WebApps WG" <public-webapps@w3.org>, "Sergiu Dumitriu" <sergiu.dumitriu@gmail.com>
Message-ID: <op.vjo09rp264w2qv@anne-van-kesterens-macbook-pro.local>
On Tue, 14 Sep 2010 18:00:21 +0200, Sergiu Dumitriu  
<sergiu.dumitriu@gmail.com> wrote:
> Indeed, this will have weird results:
> 1. open()
> 2. Add listeners
> 3. send()
> 4. abort()
> 5. In the readystatechange listener, call open() and send()
> 6. abort continues, and sends the next events: abort, loadend, but now  
> the object's state is wrong: the state is not DONE, there might be  
> network activity, the error flag is not set.
> 7. The abort algorithm sets the state to UNSENT, although a request is  
> in progress.
> One option would be to change the open() algorithm, so that step 15  
> aborts both the send() and abort() algorithms, and also the "request  
> error" algorithm. But this means that listeners won't get all the events  
> (this is also true if the open method is called when a request is  
> already in progress).

abort() can now be terminated too (by open()).

> Allowing open() to be called at all times makes it almost impossible to  
> fix this error, so another option is to not allow open to be called when  
> some other algorithms are in progress.

That seems a more dangerous way to fix this so I have not done that.

Anne van Kesteren
Received on Monday, 27 September 2010 13:34:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:11 UTC