It has to be a local var: (function(){ var window = this; })();
On Jan 7, 11:17 am, Jinpu Hu <huji...@gmail.com> wrote: > I see "var window = this" from latest svn code > > I use firebug debugger it. > > info:"Exception: redeclaration of const window" > > but in core.js > > var > // Will speed up references to window, and allows munging its name. > window = this, > // Will speed up references to undefined, and allows munging its > name. > undefined, > // Map over jQuery in case of overwrite > _jQuery = window.jQuery, > // Map over the $ in case of overwrite > _$ = window.$, > > i want to know what does "speed up references to window" mean?