Alternative to Function.bind

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Fri Mar 27 10:23:13 PDT 2009



>-----Original Message-----
>From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>bounces at mozilla.org] On Behalf Of Mark S. Miller
>
>For a getter/setter property as you're defining here, there is no
>writeable: attribute. Rather, the right way to make it read-only is
>...
>    set: undefined,
>
>>  configurable: false,

However, undefined is the default value for a set function if none is specified and since configurable is being set to false it is probably fine to simply leave out the set attribute.  Of course configurable defaults to false,  but in that case it is probably better to be explicit about the intent.

Allen


More information about the Es-discuss mailing list