Newly revised Section 10 for ES3.1.

Brendan Eich brendan at mozilla.org
Thu Jul 10 09:14:08 PDT 2008


On Jul 10, 2008, at 12:41 AM, Mark S. Miller wrote:

> On Wed, Jul 9, 2008 at 11:59 PM, Brendan Eich <brendan at mozilla.org>  
> wrote:
> Have you read
>
> http://wiki.ecmascript.org/doku.php?id=proposals:versioning
>
> ?
>
> I had read  it, but rereading it in the current context was  
> illuminating. Thanks for the pointer.
>
> Is "current document" the same as "current frame" and "current  
> global object"?

It turns out that they are coterminous and coextensive, because  
closures entrain the global object -- yet the window object as  
returned by window.open or accessed otherwise via the DOM must have  
persistent object identity -- you can write 'var w = window.open 
(...);' and no matter how many docs load in w, its object-reference  
identity is the same.

This duality requires something called "split windows", where w is  
the "outer" window object that persists across navigation, and each  
document gets a fresh "inner" window object to use as the ECMA-262  
"global object". All browsers do this now (Safari in seed 4 versions,  
if I recall Maciej's post here the other week correctly).

/be
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080710/225f555a/attachment-0002.html 


More information about the Es4-discuss mailing list