Having a non-enumerable Array.prototype.contains may not be web-compatible

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Sep 30 12:45:26 PDT 2014

"the current state of the web" ... with all due respect for that library,
it's been years since I've heard anything about it.

It's also common on the old web to loop over Arrays via `for/in` to avoid
checks for sparse indexes through the entire length ... so making anything
enumerable in that native prototype would break something else too form
days where `getOwnPropertyNames` was unknown.

long story short: I definitively +1 what Michał Wadas already said, it's
already patched and people must update software anyway due security
problems, **patches**, etc etc.

just my .02

On Tue, Sep 30, 2014 at 8:18 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> On 9/30/14, 2:45 PM, Michał Wadas wrote:
>> Bug in MooTools is not a reason to make any method of Array.prototype
>> enumerable.
> I didn't say we need to make it enumerable.
> I said that given the current state of the web, a web browser cannot ship
> a non-enumerable method named "contains" on Array.prototype.
> The options, therefore, are:
> 1)  Make the method enumerable.
> 2)  Name the method something else.
> 3)  Don't ship the method until every site that currently uses the
>     buggy versions of MooTools (which is every site that uses
>     MooTools, since they only fixed it 4 days ago).
> I'm perfectly fine with option 3, personally.  Note that in practice that
> likely means "never ship it" unless people make some sort of concerted
> effort to get sites to update their MooTools version.
> -Boris
> P.S. It may be worth avoiding the method names mootools sets up but
> doesn't force-copy in the future.  Even better would be getting them to fix
> their code so there are no such method names, of course.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140930/5c29db5b/attachment.html>

More information about the es-discuss mailing list