Why not NodeList#forEach :\?

David Bruant bruant.d at gmail.com
Mon Jun 11 06:00:30 PDT 2012


Le 11/06/2012 14:56, Hemanth H.M a écrit :
> Wow, that's interesting. When will that be implemented?
Depends on browsers. Good news is that you can polyfill it today! :-)
Actually, that could be a good fit for https://github.com/paulmillr/es6-shim

David
>
> On Mon, Jun 11, 2012 at 5:59 PM, Rick Waldron <waldron.rick at gmail.com 
> <mailto:waldron.rick at gmail.com>> wrote:
>
>
>     On Monday, June 11, 2012 at 6:30 AM, Hemanth H.M wrote:
>
>>     [].forEach.call(NodeList,function(elm) {}) why that? Why not
>>     treat it like an [] ?
>>
>     ES6 draft specifies a new Array constructor called Array.from that
>     will essentially convert "array-likes" into arrays:
>
>     Array.from( nodes ).forEach(...
>
>     Rick
>>     -- 
>>     /'I am what I am because of who we all are'/
>>     h3manth.com <http://www.h3manth.com>
>>     /-- Hemanth HM/
>>     _______________________________________________
>>     es-discuss mailing list
>>     es-discuss at mozilla.org <mailto:es-discuss at mozilla.org>
>>     https://mail.mozilla.org/listinfo/es-discuss
>
>
>
>
> -- 
> /'I am what I am because of who we all are'/
> h3manth.com <http://www.h3manth.com>
> /-- Hemanth HM/
>
>
> _______________________________________________
> 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/20120611/882b563b/attachment-0001.html>


More information about the es-discuss mailing list