From a74320fca8bb0a2190f6e1fdb71a73733b6986e4 Mon Sep 17 00:00:00 2001 From: Timmy Willison Date: Tue, 5 May 2015 11:44:55 -0700 Subject: Manipulation: privatize buildFragment() function Fixes gh-2224 --- src/manipulation/setGlobalEval.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/manipulation/setGlobalEval.js (limited to 'src/manipulation/setGlobalEval.js') 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; +}); -- cgit v1.2.3