Defining the property would loose documentation.
And it would not be available in jswrapper.c, whatever this means at the end.
AFAIK, calling jswrap_object_defineProperty expects a JS function for get/set, correct ?
Let me give another example, getPixel and setPixel, myGraphics.pixel(x,y) = newColor and var pixelcol = myGraphics.pixel(x,y) , how can I do this ?
At the end, there are lot of ways to do this, but to me it looks more elegant to set/get :-)
Line 452 in jswrap_object.c has this in JSON-definition for defineProperty
And it takes its way to reference you sent, see note at the end Note: configurable, enumerable, writable, get, and set are not implemented and will be ignored.
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.
Defining the property would loose documentation.
And it would not be available in jswrapper.c, whatever this means at the end.
AFAIK, calling jswrap_object_defineProperty expects a JS function for get/set, correct ?
Let me give another example, getPixel and setPixel, myGraphics.pixel(x,y) = newColor and var pixelcol = myGraphics.pixel(x,y) , how can I do this ?
At the end, there are lot of ways to do this, but to me it looks more elegant to set/get :-)
Line 452 in jswrap_object.c has this in JSON-definition for defineProperty
And it takes its way to reference you sent, see note at the end
Note: configurable, enumerable, writable, get, and set are not implemented and will be ignored.