- From: <nobody@w3.org>
- Date: Mon, 20 Jul 2015 23:20:40 +0000
- To: public-script-coord@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28979 Bug ID: 28979 Summary: iterable declaration and forEach ECMAScript binding issues Product: WebAppsWG Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: WebIDL Assignee: cam@mcc.id.au Reporter: ddorwin@google.com QA Contact: public-webapps-bugzilla@w3.org CC: mike@w3.org, public-script-coord@w3.org Target Milestone: --- 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 -- You are receiving this mail because: You are on the CC list for the bug.
Received on Monday, 20 July 2015 23:20:46 UTC