Ticket #991 (closed defect: invalid)
mootools breaks array comprehensions
| Reported by: | murat | Owned by: | |
|---|---|---|---|
| Type: | defect | Priority: | major |
| Milestone: | Mootools version 1.2 | Component: | Core |
| Keywords: | Cc: |
Description
mootools appears to extend Array in a manner that spoils the ability to use array comprehensions (see http://developer.mozilla.org/en/docs/New_in_JavaScript_1.7#Array_comprehensions)
Here's an example:
var numbers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] var someThings = [n for each (n in numbers)];
After executing the above code, someThings should be an array just like numbers, but if you examine it in a debugger or do something like alert(someThings), you'll see that someThings includes extra mootools baggage. This makes array comprehensions pretty much unusable.
Change History
Note: See
TracTickets for help on using
tickets.