Ticket #8082 (closed bug: fixed)
data passed to ajax success handler is undefined when dataType is script (1.5rc1)
| Reported by: | malsup | Owned by: | jaubourg |
|---|---|---|---|
| Priority: | high | Milestone: | 1.5 |
| Component: | ajax | Version: | 1.5rc1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description (last modified by malsup) (diff)
I suppose you could argue that this makes sense, but it is decidedly different behavior from previous versions of jQuery.
Example: http://jquery.malsup.com/test15rc1.html
Same test using jQuery 1.4.4: http://jquery.malsup.com/test144.html
Change History
comment:3 Changed 2 years ago by jitter
- Owner set to jaubourg
- Priority changed from undecided to high
- Status changed from new to assigned
- Milestone changed from 1.next to 1.5
This looks like a valid regression. The api docs for jQuery.ajax() explicitly mention this behavior
"script": Evaluates the response as JavaScript and returns it as plain text. Disables caching unless option "cache" is used.
jsFiddle version of the test case
comment:4 Changed 2 years ago by jaubourg
- Status changed from assigned to closed
- Resolution set to fixed
Fixes #8082. Text to script converter now returns text. Unit test added.
Changeset: 85a195c6d5ad6fccf9dd3df40ebecc338325d461
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
