W3C home > Mailing lists > Public > public-webapi@w3.org > February 2006

Re: Window object, very rough cut of proposed content for first version of spec

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 14 Feb 2006 02:45:17 -0800
Message-Id: <E6E03002-6B3F-484B-8D1A-3F43A26E9BD8@apple.com>
Cc: public-webapi@w3.org
To: Maciej Stachowiak <mjs@apple.com>


On Feb 14, 2006, at 2:29 AM, Maciej Stachowiak wrote:

>     interface Location {
>         // the current URI
>         readonly attribute DOMString href;
>
>         // pieces of the URI, per the generic URI syntax
>         readonly attribute DOMString hash; // (fragment)
>         readonly attribute DOMString host; // hostname:port if port  
> specified,
>         readonly attribute DOMString hostname; // just the  
> hostname, no port
>         readonly attribute DOMString pathname;
>         readonly attribute DOMString port;
>         readonly attribute DOMString protocol; // scheme
>         readonly attribute DOMString search;  // query

Anne pointed out that none of these attributes are actually readonly.  
Assigning a URI string href navigates to that URI. Assigning any of  
the other attributes disassembles the current URI into components,  
replaces those pieces and navigates there. Not sure why I wrote  
readonly.

Also probably worth mentioning that navigation caused by location  
assignment, attribute assignment and methods does not take effect  
until the current <script> element's script is done executing (or for  
event handlers afer event processing is done, i.e. at the next "idle"  
time), but I'm not sure how to write that in a clear and sane way.

Regards,
Maciej
Received on Tuesday, 14 February 2006 10:45:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:53 GMT