Changes between Initial Version and Version 1 of Ticket #11476
- Timestamp:
- Mar 22, 2012, 9:23:52 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #11476
-
Property
Status
changed from
new
toclosed
-
Property
Resolution
changed from
to
worksforme
-
Property
Status
changed from
-
Ticket #11476 – Description
initial v1 1 1 When using $.ajax as a deferred, the context is lost when the deferred succeeds and does its callback. Consider the following code: 2 2 {{{ 3 3 var context = { foo: "bar" }; 4 4 $.when($.ajax({ url: "...", context: context })).then(function(args) { 5 5 //Where is context gone? 6 6 }); 7 7 }}} 8 8 At the point of the comment, there is no trace of the original context object. It seems lost. According to the documentation, it should be in args[0], but args is holding [ returned data, "success", jqXHR ]. 9 9