Re: [whatwg/webidl] Are operations on the `[[BackingMap]]` and `[[BackingSet]]` page-hookable? And if not, why not? (#254)

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