Short URL: http://html5.org/r/4086
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 4086 | Try to clarify WindowProxy. | 2009-10-06 02:27 |
Index: source =================================================================== --- source (revision 4085) +++ source (revision 4086) @@ -55068,16 +55068,33 @@ <p>As mentioned earlier, each <span>browsing context</span> has a <dfn><code>WindowProxy</code></dfn> object. This object is unusual - in that it must proxy all operations to the <code>Window</code> - object of the <span>browsing context</span>'s <span>active - document</span>. It is thus indistinguishable from that - <code>Window</code> object in every way, except that it is not equal - to it.</p> + in that all operations that would be performed on it must be + performd on the <code>Window</code> object of the <span>browsing + context</span>'s <span>active document</span> instead. It is thus + indistinguishable from that <code>Window</code> object in every way + until the <span>browsing context</span> is navigated.</p> + <p>There is no <code>WindowProxy</code> interface object.</p> + + <div class="example"> + + <p>In the following example, the variable <var title="">x</var> is + set to the <code>WindowProxy</code> object returned by the <code + title="dom-window">window</code> accessor on the global scope. All + of the expressions following the assignment return true, because in + every respect, the <code>WindowProxy</code> object acts like the + underlying <code>Window</code> object.</p> + + <pre>var x = window; +x instanceof Window; // true +x === this; // true</pre> + </div> + </div> + <h3>The <code>Window</code> object</h3> <pre class="idl">[OverrideBuiltins]