On 7/22/2015 1:56 PM, David Bruant wrote:
The ES6 iterator protocol is what you're looking for. See: Alongside with the computed property syntax, you should be able to achieve what you want. Something along the lines of:
Well, I was thinking more of something built-in, other than Iterator, to achieve the same effect over a data structure (for example something that could be provided from elsewhere as an argument). But apparently I'm stuck with iterating over keys and reading values separately, or implementing my version of Iterator (at which point I don't see why I shouldn't simply use Iterator in privileged code, rather than implementing MyIterator() everywhere locally or in a MyIterator.jsm). Cheers, Paolo _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform