Re: XMLHttpRequest and HTML5 scripts

On Mon, 9 Feb 2009, Anne van Kesteren wrote:
>
> I'm trying to figure out how to deal with XMLHttpRequest and base URLs 
> again. It seems like I should say that the XMLHttpRequest interface 
> object is associated with the (current?) script's base URL and that the 
> script's character encoding for the purposes of XMLHttpRequest must be 
> assumed to be UTF-8. Does that make sense?
> 
> Does that still make sense once you do this
> 
>   window.XMLHttpRequest = frames[1].XMLHttpRequest
> 
> ... That is, will window.XMLHttpRequest still be associated with the 
> base URL of the script from frames[1]?

The base URL depends only on the script and where the script was run from, 
and is not at all affected by the XMLHttpRequest object that was used, if 
you use the script's base URL.

So if you want it to depend on the XMLHttpRequest object itself, it 
shouldn't be based on anything about the script.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 9 February 2009 20:44:41 UTC