`this` if the global object is not in the scope chain?

Kevin Smith khs4473 at gmail.com
Tue Mar 19 18:48:31 PDT 2013


> But in modules, you are never in global scope and always in strict mode.
> Hence, I don’t see a way to access the global object in the above manner
> (or in any other manner, unless it refers to itself).
>

|this| in a module still refers the the "global" object, whatever that may
be in the context of the current loader.  It *could* be `window`, or not.

{ Kevin }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130319/3d018f23/attachment.html>


More information about the es-discuss mailing list