This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The following issues are related to the iterable declaration, especially the associated forEach ECMAScript binding and other occurrences of "forEach" in the spec. (This is somewhat related to bug 28978.) In the forEach ECMAScript binding section's "If the interface has an iterable declaration..." algorithm [1]: 1. In step 4.1 , `kValue` is assigned but never used. Is `value` in 4.2 supposed to be `kValue`? 2. It is not immediately obvious that the value in the "If the interface has an iterable declaration..." algorithm is a pair "If two type parameters are given" to the iterable declaration. Perhaps a note and/or reference back to [2] and [3] would be helpful. 3. Regarding "If the interface has an iterable declaration, then the Function must have the same behavior as one that would exist assuming the interface had this operation instead of the iterable declaration:" a. What does the following text mean? Does it mean forEach’s behavior must be the same as if forEach was explicitly specified on the interface? b. The text does not seem to lead into the IDL that follows it. Perhaps the text above should be followed by something like "It has the following IDL:" In the iterable declaration section [4]: 4. Should the first Note include "forEach" like the one in the maplike [5] and setlike declaration sections? [1] implies it is present for the same reasons. 5. Regarding the "In the ECMAScript language binding" notes, the iterator declaration one refers to "properties" while the maplike and setlike declarations refer to "methods." Should these be consistent? 6. Should "key-type" and "value-type" instead be something like "value1-type" and "value2-type"? The current names imply that one is a key and the other is a value, but they are really just a pair of values with no meaning implied by the ordering. Also, the naming is misleading because the keys() and values() methods in the ECMAScript language binding don’t do what the type names imply. (keys() returns an iterator over the indexes and values() returns an iterator over the pair of values. [1] https://heycam.github.io/webidl/#es-forEach [2] https://heycam.github.io/webidl/#dfn-value-iterator [3] https://heycam.github.io/webidl/#dfn-pair-iterator [4] https://heycam.github.io/webidl/#dfn-iterable-declaration [5] https://heycam.github.io/webidl/#dfn-maplike-declaration
#4 appears to have been addressed. However, I believe `forEach` also needs to be added to the "Interfaces with iterable declarations must not have any interface members named..." sentence.