Claude Pache (2014-03-07T01:09:02.000Z)
Le 7 mars 2014 à 00:45, C. Scott Ananian <ecmascript at cscott.net> a écrit :

> And don't forget the related `DOMTokenList`, which is in
> Element.classList and thus used by everyone always.
> 

Indeed, and there is also the (less known) `htmlFor` property of  the <output> element, which is precisely a `DOMSettableTokenList`.

Since arraylike interfaces from the DOM uses `.contains()`, for the sake of consistency, the corresponding method on `Array.prototype` ought to be named `.contains()`. Sets are quite different from Arrays, so it is less important to have the same naming scheme as Sets than as all other arraylikes. (And another weaker reason to prefer `.contains()`: Maps and WeakMaps uses `.has()` for *keys*, and here we are talking about the *values* of an Array.)

—Claude
domenic at domenicdenicola.com (2014-03-20T16:10:15.448Z)
Le 7 mars 2014 à 00:45, C. Scott Ananian <ecmascript at cscott.net> a écrit :

> And don't forget the related `DOMTokenList`, which is in
> Element.classList and thus used by everyone always.
> 

Indeed, and there is also the (less known) `htmlFor` property of  the <output> element, which is precisely a `DOMSettableTokenList`.

Since arraylike interfaces from the DOM uses `.contains()`, for the sake of consistency, the corresponding method on `Array.prototype` ought to be named `.contains()`. Sets are quite different from Arrays, so it is less important to have the same naming scheme as Sets than as all other arraylikes. (And another weaker reason to prefer `.contains()`: Maps and WeakMaps uses `.has()` for *keys*, and here we are talking about the *values* of an Array.)