Re: Making properties of a class unenumerable

On May 28, 2014, at 6:41 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

> On 5/28/14, 10:05 AM, Anne van Kesteren wrote:
>> In order to get the same enumeration as before, we'd need to mark all
>> members of the object as [[Enumerable]] false.
> 
> Specifically, we'd need to mark the methods on Storage.prototype as not enumerable.
> 
> This is how built-in methods generally behave in ES.  This is not how class-defined methods behave in ES6, as far as I can tell.

Yes, this was a conscious design decision by TC39.  See https://github.com/rwaldron/tc39-notes/blob/master/es6/2012-09/sept-18.md#concise-method-definition-revisited 
and a change from what was original proposed.  TC39 consensus was driven by the belief that JS developers expect everything they define to be enumerable. 

Allen

Received on Thursday, 29 May 2014 08:06:36 UTC