by codedokode · 7y ago · 0 comments
I mean, they intentionally closed access to global object through "this" in strict mode and now they want it back.
let global = typeof window === 'undefined' ? global : window
// do something with global.theGlobalProp
(this is used to refer to currently available globals which are not going away anytime soon)
export default foo(theGlobalProp) {...; return ...;}
Why should a module reach outside its own scope?