Re: calling abort method on XMLHttpRequest instance fires onreadystatechange with readyState 4
Martijn <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
I think you're right. The xmlhttprequest is a Microsoft thing, so Mozilla should do exactly like Microsoft in this case (also because it makes sense). It seems to me that the lxr url you gave is indeed the place in the code where Mozilla is going wrong. Looking at bonsai: http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp&rev=1.147#684 That code was added with bug 258768. When reading https://bugzilla.mozilla.org/show_bug.cgi?id=258768#c4 it seems that was a foreseen side-effect of the patch. Probably you should file a bug on it, I think. Regards, Martijn On 4/1/06, Martin Honnen <[email protected]> wrote: > Martin Honnen wrote: > > > > Other implementations (Opera 8.5, IE 6 with Microsoft.XMLHTTP) simply > > abort and set readyState to 0, not firing any onreadystatechange > > handler, certainly not one with readyState 4. > > The documentation of MSXML's IXMLHttpRequest abort method > <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/7b1cfc92-5078-404a-85a2-a907fe1184a2.asp> > also says: > "The request will be returned to the UNINITIALIZED state" > and > <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/0e6a34e4-f90c-489d-acff-cb44242fafc6.asp> > defines UNINITIALIZED as 0. > > Why does Mozilla do a 4 to 0 transition with readyState, why does it not > directly go to readyState 0? > > -- > > Martin Honnen > http://JavaScript.FAQTs.com/ > _______________________________________________ > dev-tech-xml mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-xml >