-
• #2
Which code produced that error?
-
• #3
After some (purely syntactical) experiments, I found that getters/setters within IIFEs seem to be the problem. When trying
let Y = { _y:0, get y () { return this._y } }; print(Y.y); (function () { let X = { _x:0, get x () { return this._x } }; print(X.x); })();
(edited in the right section of the Espruino IDE, then uploaded to my Bangle.js) the
Y
-based constructs worked as foreseen (and even produced the intended output), but then theX
-based stuff failed.So, IIFEs seem to have their own (inner) capabilities?
-
• #4
There's a features list at http://www.espruino.com/Features
Looks like this is to do with the 'pretokenise' feature I turned on in Bangle.js to save a bit of RAM.
If you add 'E.setFlags({pretokenise:0})' before uploading your code then it'll be fine
edit: filed issue here: https://github.com/espruino/Espruino/issues/1745
-
• #5
Thank you very much - that feature list is very helpful!
-
• #6
fixed now
-
• #7
Great! Thanks a lot for your effort!
Good morning!
I just tried to use JavaScript getters and setters, but got the response:
If getters and setters are unsupported, is there some documentation which defines the supported JavaScript features?