That sounds like a grammar bug -- no time to debug at the moment but I'll
address. A Program should be able to import but not export.
Dave
On May 2, 2011, at 12:50 PM, Erik Arvidsson wrote:
http://wiki.ecmascript.org/doku.php?id=harmony:modules
According to the ES5 spec, should the following program alert the global
object or undefined? Why?
Object.defineProperty(this, 'foo', {get:function(){use strict; return
this;}});
alert((function(){use strict; return foo;})());
--
Cheers,
--MarkM
According to the spec. it should alert the global object:
The reference to foo resolves to a Reference to an object environment record.
When getValue is called on that reference it goes through step 5.a and calls
GetBindingValue on the env record. GetBindingValue does a [[Get]] on the
global
On Mon, May 2, 2011 at 5:50 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote:
According to the spec. it should alert the global object:
The reference to foo resolves to a Reference to an object environment
record. When getValue is called on that reference it goes through step 5.a
and calls
4 matches
Mail list logo