Re: How to correctly spec sequences requiring an iterable

On 11/15/13 12:55 PM, Allen Wirfs-Brock wrote:
> Now, that's an interesting question.
>
>      "thisIsAPrimitiveString"[Symbol.interator]
>
> Returns the value of
>       String.prototype[@@iterator]

Sure; the question is whether I check whether I have an object first.

Note that I've seen people wanting to overload "DOMString or 
sequence<DOMString>" and current JS libraries commonly support that (via 
typeof tests).

-Boris

Received on Friday, 15 November 2013 18:08:03 UTC