Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#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:
Blocked by: Blocking:

Description (last modified by malsup)

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 (4)

comment:1 Changed 9 years ago by malsup

Component: unfiledajax

comment:2 Changed 9 years ago by malsup

Description: modified (diff)

comment:3 Changed 9 years ago by jitter

Milestone: 1.next1.5
Owner: set to jaubourg
Priority: undecidedhigh
Status: newassigned

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 9 years ago by jaubourg

Resolution: fixed
Status: assignedclosed

Fixes #8082. Text to script converter now returns text. Unit test added.

Changeset: 85a195c6d5ad6fccf9dd3df40ebecc338325d461

Note: See TracTickets for help on using tickets.