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

On 09/27/2010 03:33 PM, Anne van Kesteren wrote:
> 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()).

OK.

All my comments were resolved, thank you.

>> 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.
>
>


-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/

Received on Monday, 4 October 2010 11:07:54 UTC