Bug Tracker

Modify

Ticket #7289 (closed enhancement: wontfix)

Opened 3 years ago

Last modified 11 months ago

.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:2 Changed 3 years ago by rwaldron

  • Cc rwaldron 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] );

Last edited 3 years ago by mot (previous) (diff)

comment:4 Changed 3 years ago by anonymous

I vote for this as well.

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

comment:6 Changed 2 years ago by rwaldron

  • Keywords ajaxrewrite added

comment:7 Changed 2 years ago by john

  • Status changed from open to closed
  • Resolution set to wontfix

By the time that we land this (1.7), we'll probably be removing the global Ajax events. Closing.

comment:8 Changed 11 months ago by jquerybugs@…

Well, 1.7 has come and gone and we still have global ajax handlers. Are the global handlers even deprecated now? Reconsider?

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.