Ticket #7289 (closed enhancement: wontfix)
.ajaxSuccess() global handler should have access to the response data
| Reported by: | skrul | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | ajax | Version: | 1.4.3 |
| Keywords: | ajaxrewrite | Cc: | rwaldron |
| Blocking: | Blocked by: | #7195 |
Description
Currently there is no way to get a request's response data in a global success handler, other than re-parsing the xhr.response yourself. Would be nice if the same data parameter that is passed to the local success handler was also passed to the global success handler.
Change History
comment:1 Changed 3 years ago by snover
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to ajax
- Blocked by 7195 added
comment:3 Changed 3 years ago by mot
I agree, simple patch is replace:
jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s] );
with
jQuery.triggerGlobal( s, "ajaxSuccess", [xhr, s, data] );
comment:5 Changed 2 years ago by anonymous
Also jQuery.handleComplete() always called with data passing, but don't pass it to jQuery.triggerGlobal() and s.complete.call()
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
