mirror of
https://github.com/jquery/jquery.git
synced 2026-02-02 09:35:09 -05:00
Fix #12838: hook point for non-jQuery.ajax synchronous script fetch/execute in domManip. Close gh-1051.
(cherry picked from commit 03db1ada2c)
This commit is contained in:
@@ -354,14 +354,7 @@ jQuery.fn.extend({
|
||||
|
||||
if ( node.src ) {
|
||||
// Hope ajax is available...
|
||||
jQuery.ajax({
|
||||
url: node.src,
|
||||
type: "GET",
|
||||
dataType: "script",
|
||||
async: false,
|
||||
global: false,
|
||||
"throws": true
|
||||
});
|
||||
jQuery._evalUrl( node.src );
|
||||
} else {
|
||||
jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
|
||||
}
|
||||
@@ -798,5 +791,16 @@ jQuery.extend({
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_evalUrl: function( url ) {
|
||||
return jQuery.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
dataType: "text",
|
||||
async: false,
|
||||
global: false,
|
||||
success: jQuery.globalEval
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user