W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2013

RE: How to correctly spec sequences requiring an iterable

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Fri, 15 Nov 2013 16:15:33 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <9c1d4db66c85408db872823d8fbdb117@BN1PR05MB325.namprd05.prod.outlook.com>
Channeling Allen... I think the "correct" (or, less prescriptively, "idiomatic") way to do this would be to just iterate over the incoming object and see what happens, letting any thrown errors bubble out.

But, bringing us back to reality, i.e. to WebIDL's argument-check-immediately paradigm, trying to iterate over anything except something where GetProperty(obj, @@iterator) returns a callable object will throw a TypeError pretty quickly. So I think it's that.


Received on Friday, 15 November 2013 16:16:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:19 UTC