aboutsummaryrefslogtreecommitdiffstats
path: root/src/manipulation/setGlobalEval.js
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-05-05 11:44:55 -0700
committerTimmy Willison <timmywillisn@gmail.com>2015-05-05 11:44:55 -0700
commita74320fca8bb0a2190f6e1fdb71a73733b6986e4 (patch)
tree36e4af65a7acfb354f7d713a1859ba81e7d53116 /src/manipulation/setGlobalEval.js
parent6d7ef56ed3004a18f5139928455cdbdc169e1232 (diff)
downloadjquery-a74320fca8bb0a2190f6e1fdb71a73733b6986e4.tar.gz
jquery-a74320fca8bb0a2190f6e1fdb71a73733b6986e4.zip
Manipulation: privatize buildFragment() function
Fixes gh-2224
Diffstat (limited to 'src/manipulation/setGlobalEval.js')
-rw-r--r--src/manipulation/setGlobalEval.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/manipulation/setGlobalEval.js b/src/manipulation/setGlobalEval.js
new file mode 100644
index 000000000..2eab9cf53
--- /dev/null
+++ b/src/manipulation/setGlobalEval.js
@@ -0,0 +1,20 @@
+define([
+ "../data/var/dataPriv"
+], function( dataPriv ) {
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+ var i = 0,
+ l = elems.length;
+
+ for ( ; i < l; i++ ) {
+ dataPriv.set(
+ elems[ i ],
+ "globalEval",
+ !refElements || dataPriv.get( refElements[ i ], "globalEval" )
+ );
+ }
+}
+
+return setGlobalEval;
+});