ES6 draft, Rev20 is now available

Boris Zbarsky bzbarsky at MIT.EDU
Wed Oct 30 13:24:01 PDT 2013


On 10/30/13 3:23 PM, Allen Wirfs-Brock wrote:
> If an API is going to return a sequence<T> to JS code

Then it becomes a JS Array object in JS.  So there is no change here.

> If an API wants to accept a sequence<T> it only needs it to have an @@iterator if it is actually going to use JS iterator semantics to process.

Sequences always use those semantics, since the first thing they do, in 
the IDL layer before entering the actual API implementation, is make a 
copy of the list.  See http://dev.w3.org/2006/webapi/WebIDL/#es-sequence

-Boris


More information about the es-discuss mailing list