Opened 15 years ago
Closed 15 years ago
#2402 closed bug (invalid)
map function string lambdas broken
Reported by: | ratbeard | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.4 |
Component: | core | Version: | 1.2.3 |
Keywords: | map lambda function | Cc: | |
Blocked by: | Blocking: |
Description
Hello, I've noticed in jQuery 1.2.3 that the string-lambda form of the second argument to the $.map function causes an error of:
callback is not a function
[Break on this error] var value = callback( elems[ i ], i );
jquery-latest line 1199
You can see this on the documentation page . The third example use of the map function does not output its display. If you save the source code locally and open it, you can see the error.
My browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9b3) Gecko/2008020511 Firefox/3.0b3
I'm running firebug 1.1.0b10
Attachments (1)
Change History (5)
Changed 15 years ago by
Attachment: | string_lambda_for_grep_and_map.patch added |
---|
comment:2 Changed 15 years ago by
This feature was originally placed in the code because it was used internally by the code powering the selectors. It has since been refactored out of the internal code to allow compatibility with Adobe AIR which recently released. There are currently no plans to add it back in and the recommended method is to use an anonymous function. You can, of course, do the necessary eval() or new Function() yourself if you really need to convert a string to a function. There are currently no plans to re-add this functionality.
comment:4 Changed 15 years ago by
Milestone: | 1.2.3 → 1.2.4 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Thanks for the tip about that plugin.
I copied the string-lambda feature back from the previous release. I don't know why it has been removed.