We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2026b1 commit 13de7c9Copy full SHA for 13de7c9
src/manipulation/_evalUrl.js
@@ -10,15 +10,19 @@ jQuery._evalUrl = function( url ) {
10
11
// Make this explicit, since user can override this through ajaxSetup (#11264)
12
type: "GET",
13
- dataType: "text",
+ dataType: "script",
14
cache: true,
15
async: false,
16
global: false,
17
- "throws": true,
18
19
// Only evaluate the response if it is successful (gh-4126)
20
- success: function( text ) {
21
- jQuery.globalEval( text );
+ // dataFilter is not invoked for failure responses, so using it instead
+ // of the default converter is kludgy but it works.
+ converters: {
22
+ "text script": function() {}
23
+ },
24
+ dataFilter: function( response ) {
25
+ jQuery.globalEval( response );
26
}
27
} );
28
};
0 commit comments