I'm trying to execute JS code from ABAP and I'm getting the following error:
Object.defineProperty is not a function.
My code:
Object.defineProperty(object, sProperty, vValue)
I want to redefine the funcion to be supported, any advice?
Note that there's a nasty Chrome error bug.
This code:
Object.defineProperty({},'asd',{})()
..on Chrome throws:
Uncaught TypeError: Object.defineProperty(...) is not a function at :1:35
..but it should say that its the returned object of Object.defineProperty
that is not a function.
For your case, it most probably mean that you are doing ()
(a function call) on the returned value of Object.defineProperty
. And to fix it, the first return value of defineProperty
must be a function, which means the first arg must be a function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With