Even though goja supports a simple form of automatic object mapping, other implementations of JS VMs might not. Further more goja is missing some more advanced features which are provided by the ObjectCreator functions, anyhow using the ObjectCreator system for lots of objects is too complex and error prone. Automatic object mapping is supposed to be a more convenient and easy API to use.
Even though goja supports a simple form of automatic object mapping, other implementations of JS VMs might not. Further more goja is missing some more advanced features which are provided by the ObjectCreator functions, anyhow using the ObjectCreator system for lots of objects is too complex and error prone. Automatic object mapping is supposed to be a more convenient and easy API to use.
Something like the following method is proposed:
The object itself defines its mapping like: