Class netscape.javascript.JSObject
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class netscape.javascript.JSObject

java.lang.Object
   |
   +----netscape.javascript.JSObject

public final class JSObject
extends Object
JSObject allows Java to manipulate objects that are defined in JavaScript. Values passed from Java to JavaScript are converted as follows: Values passed from JavaScript to Java are converted as follows:

Method Index

 o call(String, Object[])
Calls a JavaScript method.
 o eval(String)
Evaluates a JavaScript expression.
 o finalize()
Finalization decrements the reference count on the corresponding JavaScript object.
 o getMember(String)
Retrieves a named member of a JavaScript object.
 o getSlot(int)
Retrieves an indexed member of a JavaScript object.
 o removeMember(String)
Removes a named member of a JavaScript object.
 o setMember(String, Object)
Sets a named member of a JavaScript object.
 o setSlot(int, Object)
Sets an indexed member of a JavaScript object.
 o toString()
Converts a JSObject to a String.

Methods

 o getMember
  public Object getMember(String name)
Retrieves a named member of a JavaScript object. Equivalent to "this.name" in JavaScript.
 o getSlot
  public Object getSlot(int index)
Retrieves an indexed member of a JavaScript object. Equivalent to "this[index]" in JavaScript.
 o setMember
  public void setMember(String name,
                        Object value)
Sets a named member of a JavaScript object. Equivalent to "this.name = value" in JavaScript.
 o setSlot
  public void setSlot(int index,
                      Object value)
Sets an indexed member of a JavaScript object. Equivalent to "this[index] = value" in JavaScript.
 o removeMember
  public void removeMember(String name)
Removes a named member of a JavaScript object.
 o call
  public Object call(String methodName,
                     Object args[])
Calls a JavaScript method. Equivalent to "this.methodName(args[0], args[1], ...)" in JavaScript.
 o eval
  public Object eval(String s)
Evaluates a JavaScript expression. The expression is a string of JavaScript source code which will be evaluated in the context given by "this".
 o toString
  public String toString()
Converts a JSObject to a String.
Overrides:
toString in class Object
 o finalize
  protected void finalize()
Finalization decrements the reference count on the corresponding JavaScript object.
Overrides:
finalize in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index