Bug Tracker

Modify

Ticket #2486 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

jQuery.map() string as callback parameter is broken

Reported by: flexer Owned by:
Priority: critical Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: map Cc:
Blocking: Blocked by:

Description

If the argument is a string, it is treated as a short "lambda-form" function, with "a" representing the list item. For example, "a * a" may be passed instead of "function(a){ return a * a; }".

This is broken even in the docs Demo:  http://docs.jquery.com/Utilities/jQuery.map

Change History

comment:1 Changed 5 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to fixed

Thanks for pointing that out. The demo has been fixed.

For more information about why this feature was removed see #2402.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.