This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This is needed by various DOM methods. Note that in Gecko this is the base URI of the document of the current window of the browsing context of the window the DOMParser is created from or something like that. No idea what other UAs do.
The base URL would not be simply the document's URL? (The latter I think should be about:blank.)
It could be, sure. Just needs to be defined.
Ah right, so for Gecko the document's URL is indeed the "page URL". Other browsers use null, which I think they should change to about:blank so we can make document.documentURI and document.URL always be a string. I can change the document to remove the open issue and just say that URL should be about:blank.
In, ... this currently says: "Additionally, the document must have a URL value equal to the URL of the active document" This does not say "base URI". That should be added. Anything else here?
Can't we use about:blank as the document's URL? That seems much cleaner than some kind of override. No need to add a base URL, it's derived.
Assuming that's web-compatible, that seems doable. Right now interop seems to be mixed. Consider this testcase meant to test simple base URI behavior: http://jsfiddle.net/n9zb6yox/ The results I see are as follows: Gecko: http://fiddle.jshell.net/n9zb6yox/show/foo Blink: empty string Safari: foo IE11: http://fiddle.jshell.net/n9zb6yox/show/foo and this testcase tests document.URL: http://jsfiddle.net/n9zb6yox/2/ Results: Gecko: http://fiddle.jshell.net/n9zb6yox/2/show/ Blink: empty string Safari: empty string IE11: http://fiddle.jshell.net/n9zb6yox/2/show/ and this testcase tests document.baseURI: http://jsfiddle.net/n9zb6yox/3/ Results: Gecko: http://fiddle.jshell.net/n9zb6yox/3/show/ Blink: null Safari: null IE11: undefined; looks like it has no .baseURI support yet. and this testcase tests what happens with <base> in the main doc: http://jsfiddle.net/n9zb6yox/4/ Results: Gecko: http://example.com/foo Blink: empty string Safari: foo IE11: http://fiddle.jshell.net/n9zb6yox/4/foo And with <base> in the parsed doc: http://jsfiddle.net/n9zb6yox/5/ Results: Gecko: http://example.com/foo Blink: http://example.com/foo Safari: http://example.com/foo IE11: http://example.com/foo Hey, some sanity at last!