Name
JSObject.call( ): invoke a method of a JavaScript object — Java method in Java plug-in
Synopsis
public Object call(StringmethodName, Objectargs[])
Arguments
-
methodName The name of the JavaScript method to be invoked.
-
args[] An array of Java objects to be passed as arguments to the method.
Returns
A Java object that represents the return value of the JavaScript method.
Description
The call( ) method of the
Java JSObject class invokes a named method of the JavaScript object
represented by the JSObject. Arguments are passed to the method as
an array of Java objects, and the return value of the JavaScript
method is returned as a Java object.
Chapter 23 describes the data conversion of the method arguments from Java objects to JavaScript values, and the method return value from a JavaScript value to a Java object.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access