[whatwg] Resolving URLs

Adam Barth whatwg at adambarth.com
Fri Jun 27 11:21:22 PDT 2008

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.


More information about the whatwg mailing list