[whatwg] Renaming Interface Window

On 12/14/09 12:04 PM, John J Barton wrote:
> Thanks, I understand that the global object in Javascript has a property
> 'window' which references the global object

It does not, in fact.  It references a different object, which has a 
pretty intimate relationship with the global object.  But you can tell 
that it's not the same object: if two web pages are loaded in the same 
browser window one after the other, their global objects will be 
different, yet their |window| properties on those different global 
objects will point to the same object.

> and that it returns an object which implements the Web IDL WindowProxy interface specification.

Right.

>> The Window interface object (as defined by the Web IDL specification) is
>> what is on the global object's prototype chain in JavaScript.
>>
> But this cannot be literally true. There is no an 'interface object',
> just an interface

WebIDL defines how interface objects are created and exposed to the web 
page JS for certain interfaces....

> Which brings me back to my original point. Web browsers have defined
> 'window'. The HTML5 spec cannot change that. But the interface called
> "Window" in the current specification is not part of web browsers

javascript:alert(window instanceof Window) seems to be implemented the 
same way in a number of browsers, no?

-Boris

Received on Monday, 14 December 2009 12:36:48 UTC