Math.TAU

Till Schneidereit till at tillschneidereit.net
Thu Jul 3 08:09:27 PDT 2014


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 <amatiasq at gmail.com> 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
> amatiasq at gmail.com
>
>
>
> 2014-07-03 16:15 GMT+02:00 C. Scott Ananian <ecmascript at cscott.net>:
>
>
>> On Jul 3, 2014 9:15 AM, "A Matías Quezada" <amatiasq at gmail.com> 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
> 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/20140703/a9672dba/attachment.html>


More information about the es-discuss mailing list