W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

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

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 28 Jun 2011 11:07:58 +0200
Message-ID: <op.vxr3nkca64w2qv@anne-van-kesterens-macbook-pro.local>
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

Anne van Kesteren
Received on Tuesday, 28 June 2011 02:07:58 UTC

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