#14080 closed bug (plugin)
Running two JSONp calls with same jsonCallback simultaneous
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | 1.11/2.1 |
Component: | ajax | Version: | 2.0.2 |
Keywords: | Cc: | jaubourg | |
Blocked by: | Blocking: |
Description
Example: http://jsfiddle.net/MPtn6/
if you run two calls to a JSONp with the same pre-specified jsonCallback simultaneously, the second call will end with error "<Methodename> is not a function"
Change History (4)
comment:1 Changed 10 years ago by
Cc: | jaubourg added |
---|---|
Component: | unfiled → ajax |
Milestone: | None → 1.10.2/2.0.3 |
Priority: | undecided → high |
Status: | new → open |
comment:2 Changed 9 years ago by
Milestone: | 1.10.2/2.0.3 → 1.11/2.1 |
---|
comment:3 Changed 9 years ago by
Resolution: | → plugin |
---|---|
Status: | open → closed |
This was never supported nor is it supposed to be. If you want to do more advanced stuff with jsonp, use jQuery-JSONP: https://github.com/jaubourg/jquery-jsonp
comment:4 Changed 9 years ago by
Is it "advanced" to have two JSONp calls running at the same time?
At least it would be nice, to have no error raised.
Note: See
TracTickets for help on using
tickets.
Corrected repro: http://jsfiddle.net/MPtn6/1/
In a quick look at ajax/jsonp.js it looks like we're saving and restoring the original callback, but since there is already a request in flight we restore it incorrectly the second time.