Re: XHR and clearing event listeners

On Tue, 06 Mar 2007 20:02:31 +0100, Olli Pettay <Olli.Pettay@helsinki.fi>  
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...


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

Received on Friday, 9 March 2007 15:44:42 UTC