Do you want and have plans for supporting the "window" object?
Not really - it's not exactly a JS 'standard', and it makes very little sense on an embedded device that doesn't have windows :) For instance node.js doesn't have a window object either, it has something called global.
global is something I'd like to add though, but as you noted it's very easy to fake it var global = this; at the start of the program.
works with window = this;, but not with replace window.
Not sure I understand the problem? Can you give an example of what doesn't work?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Not really - it's not exactly a JS 'standard', and it makes very little sense on an embedded device that doesn't have windows :) For instance node.js doesn't have a
window
object either, it has something calledglobal
.global
is something I'd like to add though, but as you noted it's very easy to fake itvar global = this;
at the start of the program.Not sure I understand the problem? Can you give an example of what doesn't work?