<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ian Hickson wrote:
<blockquote
cite="mid:Pine.LNX.4.62.0912141940340.31755@hixie.dreamhostps.com"
type="cite">
<pre wrap="">On Mon, 14 Dec 2009, John J Barton wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">I mean that it is a Web IDL interface exposed in Web browsers as the
interface object that the global object has in its prototype chain.
</pre>
</blockquote>
<pre wrap="">By "the global object", do you mean "window" in the Javascript sense?
</pre>
</blockquote>
<pre wrap=""><!---->
"window" is a property of the global object (whose return value on getting
happens to be the WindowProxy object -- also known as the "outer window"
in some circles -- that proxies all operations to the global object).
So "yes and no", I guess.
</pre>
</blockquote>
Thanks, I understand that the global object in Javascript has a
property 'window' which references the global object and that it
returns an object which implements the Web IDL WindowProxy interface
specification.<br>
<blockquote
cite="mid:Pine.LNX.4.62.0912141940340.31755@hixie.dreamhostps.com"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">So it this correct:
"The interface Window is exposed in Web browsers as properties of the global object 'window'?"
</pre>
</blockquote>
<pre wrap=""><!---->
Not really. It's more the other way around.
</pre>
</blockquote>
But the other way around would be what? I can't invert the sentence, it
makes sense to me this way.<br>
<br>
<blockquote
cite="mid:Pine.LNX.4.62.0912141940340.31755@hixie.dreamhostps.com"
type="cite">
<pre wrap="">
</pre>
<blockquote type="cite">
<pre wrap="">But since Javascript does not have a Window interface or any interface
in fact, in what sense is the Window interface implemented by existing
browsers? I understand that they have a 'window' object, but I don't
understand that they have the Window interface.
</pre>
</blockquote>
<pre wrap=""><!---->
The Window interface object (as defined by the Web IDL specification) is
what is on the global object's prototype chain in JavaScript.
</pre>
</blockquote>
But this cannot be literally true. There is no an 'interface object',
just an interface and Javascript does not have interfaces. I think you
mean<br>
The global object in Javascript implements the Web IDL interface
Window.<br>
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, but
a part of a description of how they work. Using "Window" for this thing
is too easy to confuse with the Javascript object. By renaming this
interface we can avoid long discussions like this one.<br>
<br>
jjb<br>
<br>
<br>
</body>
</html>