aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2011-12-08 21:27:05 -0500
committerDave Methvin <dave.methvin@gmail.com>2011-12-08 21:27:05 -0500
commit07866a04ddcac0b912cd0a7e382fea8667b32d0e (patch)
tree654826918290ae7f4cb7c415c6d6b44a796501f9 /src
parente452ebd76dc0ee0e85c176bf4105e0afa77f9a34 (diff)
downloadjquery-07866a04ddcac0b912cd0a7e382fea8667b32d0e.tar.gz
jquery-07866a04ddcac0b912cd0a7e382fea8667b32d0e.zip
Fix #10753. Inline evalScript as it's only used in one place
Diffstat (limited to 'src')
-rw-r--r--src/manipulation.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/manipulation.js b/src/manipulation.js
index 5715a905d..d1100f7f8 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -348,7 +348,21 @@ jQuery.fn.extend({
}
if ( scripts.length ) {
- jQuery.each( scripts, evalScript );
+ jQuery.each( scripts, function( i, elem ) {
+ if ( elem.src ) {
+ jQuery.ajax({
+ url: elem.src,
+ async: false,
+ dataType: "script"
+ });
+ } else {
+ jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
+ }
+
+ if ( elem.parentNode ) {
+ elem.parentNode.removeChild( elem );
+ }
+ });
}
}
@@ -789,20 +803,4 @@ jQuery.extend({
}
});
-function evalScript( i, elem ) {
- if ( elem.src ) {
- jQuery.ajax({
- url: elem.src,
- async: false,
- dataType: "script"
- });
- } else {
- jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "/*$0*/" ) );
- }
-
- if ( elem.parentNode ) {
- elem.parentNode.removeChild( elem );
- }
-}
-
})( jQuery );