RE: Elements array and query/queryAll methods
Domenic Denicola <[email protected]>
| Newsgroups | gmane.comp.web.dom.general |
|---|---|
| Message-ID | <dcba1fd7018b4290b07af5654986cb93@BN1PR05MB325.namprd05.prod.outlook.com> |
From: Dean Edwards <[email protected]> > 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.