There are no property attributes defined for any _uses_ of well known symbol @@iterator (not the Symbol.iterator property itself).
Here's an example:
23.2.3.11 Set.prototype [@@iterator ] ( )
The initial value of the @@iterator property is the same function object as
the initial value of the values property.
(http://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype-@@iterator)
I expected to find a general definition here: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-properties-of-the-set-prototype-object but there is not.
This is the same for:
Reflect.prototype[@@iterator] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-reflect.loader.prototype-@@iterator
Generator.prototype[@@iterator]] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-generator.prototype-@@iterator
String.prototype[@@iterator] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-string.prototype-@@iterator
Array.prototype[@@iterator] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype-@@iterator
Map.prototype[@@iterator] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-map.prototype-@@iterator
Set.prototype[@@iterator] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype-@@iterator
Presumably they should include:
This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }.
Why writable false? It seems more consistent to use writable true (like all the other methods).
> Why writable false?
To match the attributes used to define @@toStringTag properties.
Shouldn't the clause 17 definition apply in that case?
---
Every other data property described in clauses 18 through 26 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified.
---
André,
Yes that's exactly what I was looking for, thank you.