One of the biggest and weirdest stumbling blocks I'm seeing as people try to use npm and CommonJS for browser code is the difference in spelling of global vs window.
I'd like to propose that we just go ahead and create a global called window that is a reference to node's global object.
Yes, yes, "window" is a silly name. It was silly in the browser, and it's even sillier outside of it. But it's a fixture in the language, extremely low-risk, and will reduce a lot of friction onboarding browser JavaScript people.
One of the biggest and weirdest stumbling blocks I'm seeing as people try to use npm and CommonJS for browser code is the difference in spelling of
globalvswindow.I'd like to propose that we just go ahead and create a global called
windowthat is a reference to node'sglobalobject.Yes, yes, "window" is a silly name. It was silly in the browser, and it's even sillier outside of it. But it's a fixture in the language, extremely low-risk, and will reduce a lot of friction onboarding browser JavaScript people.