W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [XHR] Invoking open() from event listeners

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 05 Feb 2012 16:27:06 +0100
To: "Eric U" <ericu@google.com>
Cc: public-webapps@w3.org, "Jonas Sicking" <jonas@sicking.cc>, "Glenn Maynard" <glenn@zewt.org>
Message-ID: <op.v87o7gyc64w2qv@annevk-macbookpro.local>
On Wed, 18 Jan 2012 00:56:12 +0100, Eric U <ericu@google.com> wrote:
> On Tue, Dec 20, 2011 at 9:24 AM, Anne van Kesteren <annevk@opera.com>  
> wrote:
>> open() does terminate both abort() and send() (the way it does so is not
>> very clear), but maybe it would be clearer if invoking open() set some  
>> kind of flag that is checked by both send() and abort() from the moment  
>> they
>> start dispatching events.
>>
>> http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html
>
> Ah, I see how that works now.  So if you call open from
> onerror/onabort/onload, there's no loadend from the terminated XHR.
> And if you call open before onerror/onabort/onload, you don't get any
> of those either?

Right.


> If you call open from onerror, do other listeners later in the chain
> get their onerror calls?

Currently they would be invoked as there is no interference with the  
normal event dispatching rules.


I'm really not sure what the best approach would be though. Advice  
welcome. If nobody has better ideas than what we now (taking into account  
compatibility of course) I will likely just clarify the situation as  
explained above.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Sunday, 5 February 2012 15:27:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT