W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2015

Re: Array-with-item in WebIDL

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Tue, 16 Jun 2015 17:55:51 -0400
Message-ID: <55809B67.8080700@mit.edu>
To: public-script-coord@w3.org
On 6/16/15 5:50 PM, Travis Leithead wrote:
> Perhaps this is heretical, but has anyone considered adding "item" and/or "contains" to the native Array.prototype object in ES?

Not "item", but "contains", yes.  It breaks websites.  See thread at 
<https://mail.mozilla.org/pipermail/es-discuss/2014-September/039717.html> 
and following.  This is why ES6 ended up with Array.prototype.includes 
instead.

Having "contains" on an Array subclass would not run into that problem 
with Mootools, of course.

-Boris
Received on Tuesday, 16 June 2015 21:56:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 16 June 2015 21:56:21 UTC