jsbell at chromium.org
Fri Nov 2 10:31:06 PDT 2012
On Fri, Nov 2, 2012 at 9:14 AM, Rick Waldron <waldron.rick at gmail.com> wrote:
> On Fri, Nov 2, 2012 at 11:25 AM, Allen Wirfs-Brock <allen at wirfs-brock.com>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 , you'll see that one of the
motivations for suggesting this was to be able to obsolete DOMStringList
 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss