On Mar 20, 2008, at 9:46 PM, Brendan Eich wrote:

> Per ECMA-262 Edition 3 10.2.3, function objects already must capture
> their scope chains including the global object terminating the chain.
> In browsers, each window (tab), frame in frameset, and iframe has a
> global object. Cross-frame calls uphold static scope by following
> their [[Scope]] internal property's value to find the right globals,
> the ones lexically closed when the function and its surrounding code
> were loaded via a <script> tag.

I should have added that optimizing implementations that close  
bindings instead of activation objects still have a problem deciding  
what bindings are global if the function uses outer names that are  
not DontDelete (var or equivalent) bindings in outer activations. If  
the function uses no outer names, then it need not entrain outer  
scopes at all, and you're right that the only requirement for  
[[Scope]], not explicit in ES3 with its lame talk of only one "global  
object", comes from apply/call as specified.

/be

_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to