archives

« Bugzilla Issues Index

#3257 — Need decision on this binding of ES6 modules


I need a final decision ASAP on the this binding visible at the top level of ES6 modules. It could be:

1) the global object
2) the value undefined (good if you need to defer the decision
3) throws when accessed (better if you need to defer)
3) the namespace object of the current module
4) something else


1. The global object

We talked about this in the breakout sessions at MS and the conclusion was that we want this to be the global object, even inside modules.


fixed in rev29 editor's draft


Domenic told me that we wanted undefined. I don't know when that was agreed upon but I support using undefined too since minimizing the use of this to only be used in classes/methods seems like a good goal.


fixed in rev29