W3C home > Mailing lists > Public > public-html@w3.org > April 2014

RE: Elements array and query/queryAll methods

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Tue, 8 Apr 2014 17:43:27 +0000
To: Dean Edwards <dean.edwards@gmail.com>, Anne van Kesteren <annevk@annevk.nl>
CC: Travis Leithead <travis.leithead@microsoft.com>, Eric Devine <devineej@gmail.com>, "public-html@w3.org" <public-html@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <dcba1fd7018b4290b07af5654986cb93@BN1PR05MB325.namprd05.prod.outlook.com>
From: Dean Edwards <dean.edwards@gmail.com>

> The question I have about this proposal is how do we handle people adding non-elements to the array?

The spec covers this. They are ignored.

> Also, this is much harder to polyfill than the previous find(All) proposal.The polyfill you linked to requires ES6

Only in the sense that subclassing arrays requires ES6 subclassing semantics (@@create, fixes to the Array.prototype.map algorithm, etc.). The polyfill linked to mostly uses ES6 for syntactic convenience.

> and I'm not convinced it works anyway, won't it potentially allow duplicates in the resulting Array?

Why would that be a problem? JavaScript developers have duplicates in their arrays all the time.
Received on Tuesday, 8 April 2014 17:44:06 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:38 UTC