Where can I find the XMLHttpRequest Implementation? [closed]
Asked Answered
D

1

15

I would like to understand the low level details of how XMLHttpRequest works in Javascript, however I have not had any luck finding the implementation code within either the Rhino or V8 code. I'm not familiar with the code in either projects, so I may not be looking in the right spots.

Is there an available open-source implementation anywhere?

Daystar answered 1/7, 2010 at 11:56 Comment(7)
I suspect that it's a facility provided by the browser, not the Javascript engine. Recall that in IE it was originally an ActiveX component.Chinkapin
Pointy is right. XMLHttpPrequest is a DOM api, so in Chrome's case it would be provided by webkit, not v8: trac.webkit.org/browser/trunk/WebCore/xml/XMLHttpRequest.cppSmattering
Crescent, your link no longer works.Misdoubt
Also regarding the IE implementation, it extends farther out to the Windows Scripting Host (WSH) such that you can use XmlHttpRequest functionality by using the applicable ActiveX component that's typically standard on Windows. So you can then use it in command line javascript on Windows (via WSH). Not sure if you get similar wiht Rhino, but you do with node.js executing XmlHttpRequest.Bowden
For newer versions of IE (IE 7+), they support the XmlHttpRequest() method natively (though don't know if internally it uses ActiveX component or not. But on IE 6 and earlier you specifically had to invoke the Active X component (or wrap XmlHttpRequest call to call that) in order to use it. There was no XmlHttpRequest object in older versions of IE.Bowden
This is the new link for webkit: trac.webkit.org/browser/trunk/Source/WebCore/xml/…Cykana
Another link: chromium.googlesource.com/chromium/blink/+/refs/heads/master/…Filigree
P
7

If I'm not mistaken, in the Mozilla source code this is handled by nsXMLHttpRequest.cpp.

Prothorax answered 1/7, 2010 at 12:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.