Nashorn ScriptObject suggestion

Youssef EL HOUTI youssef.elhouti at gmail.com
Fri Mar 7 03:09:16 PST 2014


Hi,
I'm working on a project when I use Nashorn with java 8 in many ways, and I
thought that of an improvement in the class ScriptObject that doesn't cost
much:
What? Make ScriptObject implement Map <String,Object>
Why?

   -  we could call java function from javascript by passing a javascript
   Objact as argument.
   - we could get a js function result (JSON) in java without casting...
   - ScriptObject already define almost all the methods needed (if not all)

thank you for your time and please let me know if it's a bad suggestion why?
I would be glad to help coding that.
Best Regards.


More information about the nashorn-dev mailing list