You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the first couple statements of the built javascript file, please prefix window and document with var to not create global variables in my node app :)
Also, I'm not sure if you have any control over this, but the "ro" function breaks if Array's prototype is extended. The for in loop will iterate the extra prototype items, which basically makes it so you can't instantiate any BigDecimals or BigIntegers. A normal i++ for loop gets around the problem (hasOwnProperty would also work, etc. etc.).
Thanks,
Chris
The text was updated successfully, but these errors were encountered:
The global variable pollution is fixed in the latest push, thanks.
About the unsafe loop, as you probably know, the code was generated by GWT. It seems weird that it would be so brittle and vulnerable to extending Array's prototype. Is it possible that they know for sure that this situation can't happen? Surely GWT code is mixed with hand-written Javascript in the wild, right?
Anyway, I think I may have a solution. Instead of using text manipulation to convert the generated code to a CommonJS module, I will use uglify.js. I have had success with it in the past, and it should be a more robust way to convert the code. It might not be too hard to find that bad loop and modify its syntax as well.
In the first couple statements of the built javascript file, please prefix window and document with var to not create global variables in my node app :)
Also, I'm not sure if you have any control over this, but the "ro" function breaks if Array's prototype is extended. The for in loop will iterate the extra prototype items, which basically makes it so you can't instantiate any BigDecimals or BigIntegers. A normal i++ for loop gets around the problem (hasOwnProperty would also work, etc. etc.).
Thanks,
Chris
The text was updated successfully, but these errors were encountered: