On Fri, Nov 2, 2012 at 9:14 AM, Rick Waldron <[email protected]> wrote:

>
> On Fri, Nov 2, 2012 at 11:25 AM, Allen Wirfs-Brock 
> <[email protected]>wrote:
>
>> There is also the compat issue with Mootools  with String contains...
>>
>> If we decided we needed to rename String contains then it might also
>> impact what we call a similar Array method
>>
>
> Perhaps it should be "has" instead of "contains"? Consistent with the
> other "collections".
>
>
If you dig back far enough in this thread [1], you'll see that one of the
motivations for suggesting this was to be able to obsolete DOMStringList
[2] and quietly switch existing methods to returning plain old Arrays. That
would argue for keeping the name as "contains".

But given that DOMStringList also has an explicit "items" method, and the
implications of the restriction to strings - e.g. calling d.contains(1) or
d.contains(undefined) follow WebIDL rules for stringifying the argument -
it is probably too late to actually remove DOMStringList from the platform.

[1] https://mail.mozilla.org/pipermail/es-discuss/2012-February/020726.html
[2] http://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMStringList
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to