Commit f300c5c2 authored by Rick Waldron's avatar Rick Waldron

2.0: Reduce globalEval

Signed-off-by: 's avatarRick Waldron <waldron.rick@gmail.com>
parent 155dbad0
...@@ -504,16 +504,10 @@ jQuery.extend({ ...@@ -504,16 +504,10 @@ jQuery.extend({
noop: function() {}, noop: function() {},
// Evaluates a script in a global context // Evaluates a script in a global context
// Workarounds based on findings by Jim Driscoll
// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
globalEval: function( data ) { globalEval: function( data ) {
if ( data && jQuery.trim( data ) ) { var indirect = eval;
// We use execScript on Internet Explorer if ( jQuery.trim( data ) ) {
// We use an anonymous function so that context is window indirect( data + ";" );
// rather than jQuery in Firefox
( window.execScript || function( data ) {
window[ "eval" ].call( window, data );
} )( data );
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment