Putting `global` reference in specs

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Apr 17 15:33:32 UTC 2015


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/26334b1b/attachment-0001.html>


More information about the es-discuss mailing list