I use the following command to launch a JS script: C:\Windows\System32\cscript.exe /nologo //E:{16d51579-a30b-4c8b-a276-0ff4dc41e755} in order to use the latest Chakra engine.
In my script, the command WScript.Echo( ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion() + "." + ScriptEngineBuildVersion()); outputs 11.0.19326.
I know this increases performance, and I thought I'd be also able to use the latest XMLHttpRequest instead of the good old Microsoft.XMLHTTP (I need responseURL) but it looks like I am not.
Is there a solution?
My guess is, the way you're loading the Chakra engine it's loading an invisible IE instance. But according to this MDN compatibility table there is no version of Internet Explorer that supports
responseURL.edit: don't use JScript
Through much testing, attempting to load Edge's Chakra engine into Windows Script Host, I can land on no permutation that works. Creating an
htmlfileCOM object and forcing compatibility usingx-ua-compatible, attempting the same with an HTA application (both natively and again with anhtmlfileCOM object), attempting to create aMSXML2.ServerXMLHTTP.6.0object, no Windows Script Host hack I can conceive will expose the.responseURLproperty of an XMLHttpRequest object.Best bet would be to pick a different language. In PowerShell you could do something like this:
... which would print
And if you need the equivalent of
.responseText, just add the following:If you want to parse $responseText using DOM methods...
You can see the original revision of this answer for an example of what doesn't work.