Line 614 of jQuery 1.7rc1:
window[ \"eval\" ].call( window, data );
Why not simply write
eval.call( window, data );
?
After looking at the source, I have found this link. Have a look at the emphasized text:
Sadly,
eval.call(window,src)
breaks on Chrome - it complains about contexts not matching. Odd - and I was unable to Google up why this might be so. But a couple lucky guesses later, and I discovered that window.eval.call(window,src) works on all non-IE browsers. Now, when I say "var j = 1", the window[j] is the variable that's set... So, that's good. Why do we have to add the extra window. on Chrome? Not sure - I could guess, but it's too likely to be wrong.
So, window.eval
is used to get globalEval
work in Chrome.