renderjson icon indicating copy to clipboard operation
renderjson copied to clipboard

Redefining `window` gives problems in IE9

Open lapo-luchini opened this issue 7 years ago • 1 comments

Using var window gives a redeclaration error in IE9 (while, funnily enough, works OK in IE7): image Also, I'm not sure that declaration has any use, as the only line where window is used is already managed with (window||{}). (part of the same might apply to var define and var module too, but they're not giving direct problems in IE9)

lapo-luchini avatar Feb 01 '18 14:02 lapo-luchini

The var window was put there in 8ff63537c2f30f71dbae55932fe77ef4867a6643 to fix #11. It's so when it's being webpacked/browserified the window is declared locally (since in that case the whole file is wrapped in a function) and doesn't leak the renderjson export to the global window.

I'm not sure what the solution is here.

caldwell avatar Jun 02 '18 19:06 caldwell