In Espruino Pico 1v76 I've noticed that Object.getOwnPropertyDescriptor is present, and returns a descriptor object, but everything else available in ES5 to actually define properties through descriptors is missing:
All these are undefined and I wonder why, at this point, Object.getOwnPropertyDescriptor is available. It kinda misleads features detection.
As summary: is there any plan to bring the ability to define properties through descriptors, or, if not, could we just drop getOwnPropertyDescriptor so no code would be confused about its presence?
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.
In Espruino Pico 1v76 I've noticed that
Object.getOwnPropertyDescriptor
is present, and returns a descriptor object, but everything else available in ES5 to actually define properties through descriptors is missing:All these are
undefined
and I wonder why, at this point,Object.getOwnPropertyDescriptor
is available. It kinda misleads features detection.As summary: is there any plan to bring the ability to define properties through descriptors, or, if not, could we just drop
getOwnPropertyDescriptor
so no code would be confused about its presence?Thanks!