- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Fri, 21 Apr 2006 17:41:52 -0500
- To: "Web APIs WG (public)" <public-webapi@w3.org>
The documentation for the |uri| argument to XMLHttpRequest.open says: A URI, which MUST be resolved to an absolute URI using the script's context window.location.href value as base if available. What is "the script's context" exactly? It's not defined in the spec. Assuming we limit ourselves to ECMAScript (outside of which there is no "script"), consider the following situation: Two windows, A and B, have the same origin but different URIs (say different directories on the same server). Window A has the following code: var xhr; function create() { xhr = new XMLHttpRequest(); } function callOpen(url) { xhr.open("GET", url, true); } Window B has the following code: var A; // Get reference to Window A into |A|. function runTest() { A.create(); A.callOpen("test.xml"); } In this situation, which URI should be used as the base URI? Does it matter whether runTest() was called from code in some other window C (possibly C == A)? -Boris
Received on Friday, 21 April 2006 22:41:56 UTC