Closed andrecastelo closed 1 year ago
See "Mod API" section in https://www.nexusmods.com/diablo2resurrected/mods/169
Note: The JavaScript inside this file is run without access to the global scope. (e.g. You’ll need to use for/in instead of Object.keys since Object is not available). The Math API is exposed for you, however.
Basically, this is one of the limitations originally imposed to try to sandbox the mods and prevent them from doing something harmful.
Thanks for the clarification!
Hey man, love the work with D2RMM. I'm playing around with a mod, trying to refactor some code, and while trying to use
Object.keys(...)
I get this:Is this a limitation on electron or on the way that the mod code is executed?