[whatwg] Resolving URLs

Ian Hickson ian at hixie.ch
Mon Dec 29 02:23:57 PST 2008

On Fri, 27 Jun 2008, Adam Barth wrote:
> In <http://www.whatwg.org/specs/web-apps/current-work/#resolving>, the 
> spec says:
> "If the URL to be resolved was passed to an API
>     The base URL is the document base URL of the script's script 
> document context."
> I believe browsers differ on this point.  When resolving a URL received 
> from a script, there are three likely sources of a base URL:
> 1) The script's script document context (i.e., the document of the
> window object lexically in scope).
> 2) The document of the window object dynamically in scope.
> 3) The document to which the API belongs.
> I'm working on a test suite to reverse engineer the behavior of current 
> browsers and will report my findings.

The spec has changed now, but it is still based on a feature of the script 
right now. I would be interested in hearing the results of your research.

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

More information about the whatwg mailing list