Re: Iterating over the properties of an ECMAScript object

Hi David,

(2014/04/17 17:13), David Bruant wrote:
 > ...
> I think that for this sort of cases, it makes sense to visit inherited
> properties (so authors can define a default set of properties and
> override via prototype shadowing creating an object with
> `Object.create(defaultObj)`)
> ES6 defines an internal [[Enumerate]] operation for all objects
> http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinary-object-internal-methods-and-internal-slots-enumerate
>
> It's what is used by for-in loops (enumerate over own and inherited
> enumerable properties). Maybe that's what you should use.

Thanks David! That makes sense. I've updated the spec to use 
[[Enumerate]] instead of Object.keys().

Thanks again,

Brian

Received on Friday, 18 April 2014 03:58:43 UTC