Hi, I'm a Rhino newbie ...
Suppose that I have successfully defined a function in javascript that
returns a String:

function myfun(s) {
  s = s + " RECEIVED!";
  return s;
}

I can call myfun from java using something like this:

String res = (String)(cx.evaluateString(scope, "myfun(\"hello world
\")", "bzzz", 1, null));

Is there a fastest and optimized way to do this?!?!?

For example retrieve the corresponding javascript FunctionObject and
use a method "call" (if it exists) ?!?!?

Thank you in advance,
  Vor





_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to