Re: XHR and clearing event listeners

On Fri, 09 Mar 2007 16:44:19 +0100, Anne van Kesteren <annevk@opera.com>  
wrote:
>> I wonder why the current XMLHttpRequest draft has the following:
>> "If something goes wrong (infinite loop, network errors) the state must  
>> be set to loaded and all members (excluding readyState) of the object  
>> must be set to their initial value. Also, if async is set to false, a  
>> NETWORK_ERR exception must be raised. In addition, all registered event  
>> listeners must be removed."
>> What is the reason to remove all event listeners?
>
> If I remember correctly that's compatible with what Internet Explorer is  
> doing currently. However, I'm now thinking that Internet Explorer might  
> actually keep the event listener registered but just not allow it to be  
> reused (which is a bug). Much like they do with invoking open() at the  
> wrong time...

See http://tc.labs.opera.com/apis/XMLHttpRequest/send/004.htm for  
instance. I might be doing something wrong though...


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Received on Friday, 9 March 2007 16:11:41 UTC