W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] Reconcile document.URL and document.documentURI?

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 13 Jan 2012 22:30:06 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1201132214440.14154@ps20323.dreamhostps.com>
On Tue, 28 Jun 2011, Anne van Kesteren wrote:
>
> Is there a way we can make these consistent somehow? Maybe move
> document.documentURI to Web Applications 1.0? With createHTMLDocument() I get
> these results:
> 
>        document.URL         document.documentURI
> Gecko   "about:blank"        "about:blank"
> Chrome  ""                   null
> Opera   script document URL  null
> Safari  ""                   null
> 
> Only Opera seems to conform here for document.URL which I think means 
> the specification should change. I kind of prefer what Gecko is doing 
> here. Not having the strange null-ability of attributes that take URLs 
> and simply (with apologies to hsivonen) use about:blank.
> 
> I also found that both Opera and Gecko throw for setting 
> document.documentURI. Maybe we should take that opportunity and make it 
> readonly (or nuke it entirely, if that is feasible).
> 
> For DOM Core this is http://www.w3.org/Bugs/Public/show_bug.cgi?id=13045

On Sat, 30 Jul 2011, Anne van Kesteren wrote:
> 
> I moved document.URL to DOM Core, made document.documentURI readonly, 
> and have them both return the same URL concept, which defaults to 
> "about:blank".

They now always return about:blank, since this URL concept is never set.

So um... when should it be set? Is it just "the document's address" but 
with the change that the document's address is about:blank for 
create*Document()-created documents?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 13 January 2012 14:30:06 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:39 UTC