Has TC39 discussed how to handle the fact that there are a couple of
classes in the DOM, like DOMStringList, which we'd like to replace
with normal JS Arrays. But these DOM classes have a .contains function
which so far has meant that such a switch was not possible due to the
arrays not having a .contains.

I had hoped that once Arrays got a .contains function that we could
make this switch.

Does TC39 recommend that we stick with returning DOM objects here and
not switch to Arrays? Or that we do something else?

/ Jonas

On Fri, Nov 21, 2014 at 5:10 AM, Till Schneidereit
<t...@tillschneidereit.net> wrote:
> Greetings!
>
> TC39 has decided to solve the web-compat issues with
> Array.prototype.contains that forced us to back out the feature on October
> 1st by renaming the method to "includes". This has now landed on Nightly.
> However, it is Nightly-only for now, so don't use it in production code
> that's intended to make the merge to Developer's Edition.
>
> In further news and for similar reasons, String.prototype.contains will be
> renamed to "includes" as well. This is somewhat unfortunate as we've been
> shipping String.prototype.contains since Firefox 18. To work around that,
> it'll probably be necessary to keep contains as an alias for a while,
> ideally with a warning logged to the console. The rename is tracked in bug
> 1102219.
>
> thank you,
> till
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to