Re: [webidl] Fix some problems with iterable declarations. (#72)

>                      <li><a href="#es-invoking-callback-functions">Invoke</a> <var>callback</var> with <var>thisArg</var>
>                        as the <a class="dfnref" href="#dfn-callback-this-value">callback this value</a> and
> -                      <var>k</var> and <var>value</var> as its arguments.</li>
> +                      <var>value</var>, <var>key</var> and <var>O</var> as its arguments.</li>
> +                    <li>Update <var>pairs</var> to the current list of <a class="dfnref" href="#dfn-value-pairs-to-iterate-over">value pairs to iterate over</a>.
> +                      <div class="note"><div class="noteHeader">Note</div>
> +                        <p>Depending on whether prose accompanying the interface defined this to be a snapshot at the time

Yeah, that's not going to work.  I suppose we should be more explicit about what's going on here.  But first question: do we want to bother with supporting both snapshotted lists to iterate over here?  Map.prototype.forEach doesn't snapshot, although it will guarantee that an entry added after iteration starts (which is not then deleted) will be iterated before iteration ends, which isn't something we can guarantee by using an index.

---
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/72/files#r44892455

Received on Monday, 16 November 2015 06:35:32 UTC