expose custome object or function to script environementt
A. Sundararajan
sundararajan.athijegannathan at oracle.com
Tue Feb 4 23:16:09 PST 2014
The question is not clear. Avatar.js uses plain javascript and some
Java to implement node.js. It does not use any other magic. If you want
your object to support functions, you could do that in many ways:
var process = {
foo: function() {....}
};
process.foo();
Am I missing something?
-Sundar
On Wednesday 05 February 2014 12:28 AM, buddhi mihara wrote:
> i am using second option you suggested.(using jsObject)
> i used script object class to create a scriptObject called process.(similar to node process) ,but everytime i need to add a function(like abs() function in Math) to this scriptObject do i need to write a java class which extends from jsObject and create a new object of that class or is there any workaround.(in my script i need to access something like process.bind()).
More information about the nashorn-dev
mailing list