definePrototypeProperty

fun definePrototypeProperty(name: String, value: Any?, attributes: Int)
fun definePrototypeProperty(key: Symbol, value: Any?, attributes: Int)


fun definePrototypeProperty(cx: Context, name: String, getter: ScriptableObject.LambdaGetterFunction, attributes: Int = DONTENUM or READONLY)

Defines a prototype property through a getter. The result looks exactly like a property defined with Object.defineProperty and an accessor descriptor.


The getter and setter pair version of definePrototypeProperty.