Javet
Javet copied to clipboard
Feature Request: generic Bracket propery accessor
First of all: Thanks for the awesome work. Since seemingly every Script Integration standard has been abandoned, Javet is a great fit for my project.
I'd like to request a feature:
I am using proxies to bind functions and pass them into javascript. It would be great if there was a feature where i can use the bracket syntax of JavaScript i a generic way (maybe there is already a way but i don't know how):
@V8BracketFunction
fun getProperty(propertyName: String) : String {}
@V8BracketFunction
fun setProperty(propertyName: String, value: String) {}
An in javascript i could do the following on the object:
myObj["myProperty"] = "Test"
console.log(myObj["myProperty"])
So i am basically searching for a way to generically handle property access.
I wonder if you have tried @V8Getter and @V8Setter.