Skip to content

Commit

Permalink
Ajax: simplify one ajax call and add explanatory comment
Browse files Browse the repository at this point in the history
* Remove "async = true" from script transport since it was needed
  for FF < 4 and old Opera which we do not support anymore

* Add comment to "evalUrl" method on why "type" field should be explicit
  • Loading branch information
markelog committed Feb 14, 2015
1 parent fcb6c4d commit 0ac28ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/ajax/script.js
Expand Up @@ -39,7 +39,6 @@ jQuery.ajaxTransport( "script", function( s ) {
return {
send: function( _, complete ) {
script = jQuery("<script>").prop({
async: true,
charset: s.scriptCharset,
src: s.url
}).on(
Expand Down
2 changes: 2 additions & 0 deletions src/manipulation/_evalUrl.js
Expand Up @@ -5,6 +5,8 @@ define([
jQuery._evalUrl = function( url ) {
return jQuery.ajax({
url: url,

// Make this explicit, since user can override this through ajaxSetup (#11264)
type: "GET",
dataType: "script",
cache: true,
Expand Down

0 comments on commit 0ac28ed

Please sign in to comment.