Changes between Initial Version and Version 1 of Ticket #9399


Ignore:
Timestamp:
Jun 13, 2009, 11:25:54 AM (10 years ago)
Author:
bill
Comment:

Hmm, according to http://docs.jquery.com/Utilities/jQuery.each and http://docs.jquery.com/Core/each, jquery's each() method is like dojo's every() method, in that if/when the callback function returns false, it breaks the loop.

Dojo's forEach() method is different in that it ignores the callback's return value.

Maybe it makes more sense to alias dojo.every to dojo.each, although I'm generally not a fan of aliases.

Note that Dojo's forEach() is named after Array.forEach in javascript.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #9399 – Description

    initial v1  
    1 Enhancement suggestion: alias the forEach method (wherever it's used) as each.  This should make the code more compact. Note that both MooTools and jQuery use each().
     1Enhancement suggestion: alias the forEach method (wherever it's used) as each.  This should make the code more compact. Note that both !MooTools and jQuery use each().