Name
JSObject.getSlot( ): read an array element of a JavaScript object â Java method in Java plug-in
Synopsis
public Object getSlot(intindex
)
Arguments
-
index
The index of the array element to be read.
Returns
The value of the array element at the specified
index
of a JavaScript object.
Description
The getSlot( )
method of
the Java JSObject class reads and returns to Java the value of an
array element at the specified index
of a
JavaScript object. The return value may be another JSObject object
or a Double, Boolean, or String object, but it is returned as a
generic Object, which you must cast as necessary.
Get JavaScript: The Definitive Guide, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.