Java representation of a JavaScript object.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Creates a new instance of a JSObject. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Methods
| Method | IE | Mozilla | Netscape | Opera | Safari |
|---|---|---|---|---|---|
Invokes the specified method of the JavaScript object. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Evaluates a piece of JavaScript code. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Gets the value of a JavaScript property. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Gets the value of an element in a JavaScript array. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Gets a JSObject for a browser window. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Deletes a property from a JavaScript object. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Sets the value of a property for a JavaScript object. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Sets the value of an array element for a JavaScript object. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Calls toString on a JavaScript object. | 4.0+ | 1.0+ | 3.0+ | 7.0+ | 1.0+ |
Constructor Detail
Method Detail
call(String methodName, Array args) : Object
Invokes the specified method of the JavaScript object.
| String | methodName | Method to invoke. |
| Array | args | Arguments (if any) to be taken by the method. |
eval(String s) : Object
Evaluates a piece of JavaScript code.
| String | s | Code to be evaluated. |
getMember(String name) : String
Gets the value of a JavaScript property.
| String | name | Name of the property. |
getSlot(int index) : Object
Gets the value of an element in a JavaScript array.
| int | index | Index of the element in the array. |
getWindow(java.applet.Applet applet) : Object
Gets a JSObject for a browser window.
| java.applet.Applet | applet | Applet to obtain a JSObject for. |
removeMember(String name) : Object
Deletes a property from a JavaScript object.
| String | name | Name of the property. |
setMember(String name, Object value) : Object
Sets the value of a property for a JavaScript object.
| String | name | Name of the property. |
| Object | value | Value that the property should be set to. |
setSlot(int index, Object value) : Object
Sets the value of an array element for a JavaScript object.
| int | index | Index of the element in the array to be set. |
| Object | value | Value of the element to be set. |
toString() : String
Calls toString on a JavaScript object.
