netscape.javascript.JSObject
extends Object
.
java.lang.Object
|
+----netscape.javascript.JSObject
netscape.javascript.JSObject
and passed to Java. JSObject
allows Java to manipulate JavaScript objects.
When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type JSObject
; when a JSObject
is sent from Java to JavaScript, the runtime engine unwraps it to its original JavaScript object type. The JSObject
class provides a way to invoke JavaScript methods and examine JavaScript properties.
Any JavaScript data brought into Java is converted to Java data types. When the JSObject is passed back to JavaScript, the object is unwrapped and can be used by JavaScript code. See the Core JavaScript Guide for more information about data type conversions.
netscape.javascript.JSObject
class has the following methods:
netscape.javascript.JSObject
class has the following static methods:
Method |
Description
| |
---|
this.methodName(args[0], args[1], ...)
" in JavaScript.
public Object call(String methodName,
Object args[])
JSObject
objects refer to the same instance.
Overrides: equals
in class java.lang.Object
public boolean equals(Object obj)
equals
method of java.lang.Object
or the ==
operator to evaluate two JSObject
objects.
public Object eval(String s)
this.name
" in JavaScript.
public Object getMember(String name)
this[index]
" in JavaScript.
public Object getSlot(int index)
JSObject
for the window containing the given applet. This method is useful in client-side JavaScript only.
public static JSObject getWindow(Applet applet)
public void removeMember(String name)
this.name = value
" in JavaScript.
public void setMember(String name,
Object value)
this[index] = value
" in JavaScript.
public void setSlot(int index,
Object value)
JSObject
to a String
.
Overrides: toString
in class java.lang.Object
public String toString()
Last Updated: 10/29/98 20:17:50