`this` inside modules

Marius Gundersen gundersen at gmail.com
Mon Jun 9 14:10:49 PDT 2014


What is an arrow function bound to in a module?

```js
export var a = () => this;
```


On Mon, Jun 9, 2014 at 7:08 PM, Caridy Patino <caridy at gmail.com> wrote:

> My point: if 'this' is not global in modules, then ES6 must have an
>> alternative way to name the global object.
>>
>
> Yes, we covered that last week. `Reflect.global` seems like the right
> place for it considering that it will be defined per realm.
>
> _______________________________________________
> 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/20140609/bc31421e/attachment.html>


More information about the es-discuss mailing list