defineProperty
fun defineProperty(cx: Context, name: String, getter: ScriptableObject.LambdaGetterFunction?, setter: ScriptableObject.LambdaSetterFunction?, attributes: Int)
fun defineProperty(cx: Context, name: String, getter: ScriptableObject.LambdaGetterFunction, attributes: Int)
fun defineProperty(cx: Context, key: Symbol, getter: ScriptableObject.LambdaGetterFunction?, setter: ScriptableObject.LambdaSetterFunction?, attributes: Int)
fun defineProperty(scope: Scriptable, name: String, length: Int, target: SerializableCallable, attributes: Int = DONTENUM, propertyAttributes: Int = DONTENUM or READONLY)
Defines a method backed by a Kotlin lambda.
Defines a property whose value comes from a lambda that needs nothing but itself.