Bug Tracker

Ticket #1863 (new enhancement)

Opened 10 months ago

Last modified 9 months ago

support for error and timeout in JSONP calls

Reported by: tr4nslator Assigned to: anonymous
Type: enhancement Priority: major
Milestone: 1.2.2 Component: ajax
Version: 1.2.1 Keywords:
Cc: Needs: Review

Description

As discussed in this thread, jQuery would benefit significantly from the addition of timeout and error handlers for JSONP calls, helping to close the functionality gap XHR calls.

Such support could be added by:

* using setTimeout before the script is injected to call the error function when the timeout time elapses,
* using clearTimeout when the script is successfully executed to remove the above call, and
* using the onerror handler for the script, to call the error function in the event that the script returns a non-200 response (and therefore is not executed).

Also, it would help if the injected script was returned by $.ajax for further manipulation, just as the XHR object is returned for XMLHttpRequest calls.

Attachments

Change History

Changed 9 months ago by john

  • owner deleted
  • component changed from core to ajax
Note: See TracTickets for help on using tickets.