That doesn't mean that you cannot extend builtins - if you don't explicitly load a module into its own Realm using the ModuleLoader, it shares builtins with all other modules.
Also note that a Module object isn't the scope for a module script. It's a reflection of the internal metadata about the module. The script itself runs in a global which in browers is the Window object by default. On Thu, Jul 3, 2014 at 4:55 PM, A Matías Quezada <[email protected]> wrote: > > http://people.mozilla.org/~jorendorff/es6-draft.html#sec-runtime-semantics-module-objects > > > A Module object is an exotic object whose own properties corresponding > corresponding to the ExportedBindings of the module identifed by the > ModuleImport FromClause. Each property name is the StringValue of the > corresponding exported binding. These are the only properties of an Module > object. Each one is a read-only property with attributes {[[Configurable]]: > false, [[Enumerable]]: true}. **Module objects are not extensible.** > > Maybe this is still under discussion, below you can see > > > Needs to decide whether a module object is an ordinary or an exotic > object. Whether properties are accessor or defined via [[Get]], etc. > > But for now the draft says they're not extensible. > > --- > A. Matías Quezada > Senior Javascript Developer > [email protected] > > > > 2014-07-03 16:15 GMT+02:00 C. Scott Ananian <[email protected]>: > > >> On Jul 3, 2014 9:15 AM, "A Matías Quezada" <[email protected]> wrote: >> > PS: Also in ES6 modules it will be not possible to extend module Math. >> >> Really? That will be quite problematic when it comes time to write >> es7-shim. >> --scott >> > > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

