Re: [XHR] can't get this.readyState to work

On Mon, 2007-08-13 at 22:01 -0500, Boris Zbarsky wrote:
> Dan Connolly wrote:
> > function handler() {
> >     alert("@@ handlder state, status:" + this.readyState + "/" +
> > this.status);
> > }
> > 
> > client.onreadystatechange = handler;
> > 
> > and I get undefined for this.readyState and this.status.
> > 
> > I'm using firefox 2.0.0.6 on ubuntu linux.
> 
> In Gecko 1.8 (Firefox 1.5 and Firefox 2), |this| is not bound to the 
> XMLHttpRequest object when the onreadystatechange function is called.
> 
> In Gecko 1.9 it will be bound to the XMLHttpRequest object.  Similarly, 
> event.target will be the XMLHttpRequest object in 1.9.
> 
> See https://bugzilla.mozilla.org/show_bug.cgi?id=198595 for details.

Oh my.

Thanks for the details.

> In other words, the example should work with, say, 
> http://www.mozilla.org/projects/firefox/3.0a7/releasenotes/#downloadandinstall
> 
> -Boris
-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/

Received on Tuesday, 14 August 2007 04:32:50 UTC