[whatwg] Renaming Interface Window

Ian Hickson ian at hixie.ch
Mon Dec 14 11:08:56 PST 2009


On Mon, 14 Dec 2009, John J Barton wrote:
>
> (I made a comment on the doc along these lines but I am uncertain about 
> whether these comments work).

They work. :-) 


> The HTML5 spec uses the heavily overloaded word "Window" for an interface:
> http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#the-window-object
> 
> This overloading causes confusion and coding errors. In a new 
> specification, selecting a new made up word for this important interface 
> simplifies the documentation, discussion, and coding with the interface.

It's not a new interface. It's the interface implemented by all 
(scriptable) browsers and called Window by all those browsers.


> I'm sure I don't have to enumerate all the overloadings, as reader here 
> will be quite familiar with them. There is no one certain thing called 
> "Window". In the context of HTML5, there is one certain thing called 
> 'window', the global scope for Javascript. However unfortunate that 
> choice may have been, it was made. HTML5 can avoid confusion by taking a 
> new name rather than "Window".

We don't get to pick the name -- the name is what browsers already 
implement and what the Web depends on.


> Based on the document, it seems like the interface in question would be "BrowsingContext". Consider:
>   "...each browsing context has a WindowProxy object."
> and
> 
>  interface Window {
>   // the current browsing context
>   readonly attribute WindowProxy window;
> 
>  These could read:
>   "...each BrowsingContext has a WindowProxy object."
> and
>   
> interface BrowsingContext {
>   // the proxy for the current browsing context
>   readonly attribute WindowProxy browsingContext;

As far as I can tell that would be wrong. The Window object is a DOM 
object, it's not the same as the browsing context, which is a UA 
construct.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list