Putting `global` reference in specs

Jordan Harband ljharb at gmail.com
Fri Apr 17 23:35:27 UTC 2015


I was under the impression there'd been some interest in a
`Reflect.global()` as a uniform method of providing the global object, or a
proxy to one, in all engines. That would be something that's easily
polyfilled back as far as we like, would allow most code that currently
relies on indirect eval to work in a CSP environment (including the
es6-shim), and would not impose any new global variables, nor any
restrictions on global variables, on existing engines.

Is there some reason that a Reflect function (or accessor, but I'd prefer a
function for ES3 engine support) wouldn't be an option?

On Fri, Apr 17, 2015 at 2:38 PM, Brendan Eich <brendan at mozilla.org> wrote:

> The principle extends just fine to workers, and has.
>
> /be
>
> Andrea Giammarchi wrote:
>
>> And that's indeed the only place on Web world where `self` makes sense:
>>
> _______________________________________________
> 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/df18823c/attachment.html>


More information about the es-discuss mailing list