- From: Tab Atkins Jr. <notifications@github.com>
- Date: Fri, 29 Apr 2022 12:13:31 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 29 April 2022 19:13:43 UTC
The [ES MapIterator algo](https://tc39.es/ecma262/#sec-createmapiterator) just (1) checks the object has a [[MapData]], (2) creates a closure that iterates over the [[MapData]] and yields IterResults, and then (3) makes an iterator from that closure with `%MapIteratorPrototype%` as the prototype. As far as I can tell I can just copy that, swapping step 1 for the current security/coherence checks in WebIDL, swapping step 2 for an algo that iterates over the Infra map (but is otherwise identical), and then invokes step 3 exactly as currently written. That should still produce an iterator with the correct proto and the same observable iteration behavior, just iterating over a different impl-internal data structure. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/issues/254#issuecomment-1113641163 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/issues/254/1113641163@github.com>
Received on Friday, 29 April 2022 19:13:43 UTC