Putting `global` reference in specs

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Apr 17 15:39:05 UTC 2015


also `eval` can be in-scope redefined as much as global, window, or self,
so no, that's actually not a solution.

Btw, I wasn't asking for a workaround, I was proposing to officially bring
ES 2015 `global` object as language reference in ES7/201X

It's a very tiny improvement for every developer benefit ( 8.5 + 14.1
millions of results in Github for `typeof global` apparently got unnoticed )

On Fri, Apr 17, 2015 at 4:33 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:

> it's a no-go under CSP so it's as bad as `Function('return this')()`
>
> On Fri, Apr 17, 2015 at 4:29 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>
>> On 4/17/15 11:27 AM, Mark S. Miller wrote:
>>
>>> (1,eval)('"use strict"; this')
>>>
>>
>> This has the drawback of making eyes bleed, but the benefit of working
>> reliably (unlike "window", "self", or "global").... ;)
>>
>> -Boris
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150417/473a8830/attachment-0001.html>


More information about the es-discuss mailing list