W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

It doesn't make sense to use [MapClass] for the CacheList interface

From: Boris Zbarsky <bzbarsky@mozilla.com>
Date: Thu, 08 May 2014 23:14:44 -0400
Message-ID: <536C4824.7080109@mozilla.com>
To: public-webapps <public-webapps@w3.org>
I'm looking at 

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.

Received on Friday, 9 May 2014 03:15:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC