Commit 68b4ec5
authored
Ajax: Make responseJSON work for erroneous same-domain JSONP requests
Don't use a script tag for JSONP requests unless for cross-domain requests
or if scriptAttrs are provided. This makes the `responseJSON` property available
in JSONP error callbacks.
This fixes a regression from jQuery 3.5.0 introduced in gh-4379 which made
erroneous script responses to not be executed to follow native behavior.
The 3.x-stable branch doesn't need this fix as it doesn't use script tags for
regular async requests.
Closes gh-4778
Ref gh-4771
Ref gh-4773
Ref gh-43791 parent 1a5fff4 commit 68b4ec5
1 file changed
+18
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
6 | 22 | | |
7 | 23 | | |
8 | 24 | | |
| |||
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
38 | | - | |
| 54 | + | |
39 | 55 | | |
40 | 56 | | |
41 | 57 | | |
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
| |||
0 commit comments