On Fri, 10 Nov 2006 20:37:35 +0100, Anne van Kesteren <[EMAIL PROTECTED]> wrote:
If you want to be compatible with IE for this, what you should check is what happens if the base URI is _changed_ while the XMLHttpRequest object exists, e.g. by changing the attribute directly or by mutating the <base> elements in the document (if that works).

I just tested this. Internet Explorer indeed takes note of of changes to <base>. (Either changing .href or adding a <base> element.) Ouch!

I forgot to mention the testcases in my previous e-mail:

   http://tc.labs.opera.com/apis/XMLHttpRequest/open/018.htm
   http://tc.labs.opera.com/apis/XMLHttpRequest/open/019.htm
   http://tc.labs.opera.com/apis/XMLHttpRequest/open/020.htm

Note that the pass conditions of none of the above should be considered stable. The testcases will change over time to reflect the latest version of the Working Draft. They are just to aid in decisions on moving forward at the moment.

I added the following testcases based on suggestions from Björn (thanks!):

  http://tc.labs.opera.com/apis/XMLHttpRequest/open/021.htm
  http://tc.labs.opera.com/apis/XMLHttpRequest/open/022.htm
  http://tc.labs.opera.com/apis/XMLHttpRequest/open/023.htm

I also modified some of the earlier mentioned testcases (flush your cache) to reflect what Internet Explorer implements. The moment you invoke the open() method Internet Explorer resolves the URI and stores it as part of the object. Changing it after open() has no effect on the fetched URI.

I suppose the draft should say that you store a reference to the baseURI attribute instead of storing the value. The only problem with that is what when the iframe is removed you can't directly remove the window object. Other testcases have demonstrated that in such cases you still use the baseURI from that Window if you used the XMLHttpRequest attribute from that Window as constructor:

  http://tc.labs.opera.com/apis/XMLHttpRequest/open/015.htm


(I hope the above is relatively clear. Feel free to ask questions.)


--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Reply via email to