[Bug 20378] Need to define base URI for the document created via DOMParser

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20378

--- Comment #6 from Boris Zbarsky <bzbarsky@mit.edu> ---
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!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.

Received on Tuesday, 14 October 2014 12:04:29 UTC