Le 7 mars 2014 à 00:45, C. Scott Ananian <ecmascr...@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

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to