I'm looking at https://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html#cache-list here.

The point of [MapClass] (assuming [MapClass] stays in the WebIDL spec at all) is to declare interfaces that quack enough like Map that it makes sense to have them be instanceof Map and have Map.prototype on their proto chain.

But as the "Issue" in the text notes, CacheList doesn't so much behave like a Map. You put in Cache objects but get out Promise objects. The set() method doesn't return the object you called it on, but something completely different. has() returns a different type from ES6 Map.

I don't think it's worth trying to use MapClass here; this just isn't a Map in any sense, though clearly it's somewhat related to one.

-Boris

Reply via email to