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.

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".

 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;

And to take another random example:
window . top

Returns the WindowProxy for the top-level browsing context.

Note how now the comment  just makes sense, rather than requiring the reader to puzzle out the relation between browsing context and interface Window.
(I made a comment on the doc along these lines but I am uncertain about whether these comments work).

jjb
 


Reply via email to