Section 25.183. JSObject: Java representation of a JavaScript object


25.183. JSObject: Java representation of a JavaScript object

Java class in Java plug-in

25.183.1. Synopsis

 public final class netscape.javascript.JSObject extends Object 

25.183.2. Methods


call( )

Invokes a method of the JavaScript object.


eval( )

Evaluates a string of JavaScript code in the context of the JavaScript object.


getMember( )

Gets the value of a property of the JavaScript object.


getSlot( )

Gets the value of an array element of the JavaScript object.


getWindow( )

Gets a "root" JSObject that represents the JavaScript Window object of the web browser.


removeMember( )

Deletes a property from the JavaScript object.


setMember( )

Sets the value of a property of the JavaScript object.


setSlot( )

Sets the value of an array element of the JavaScript object.


toString( )

Invokes the JavaScript toString( ) method of the JavaScript object and returns its result.

25.183.3. Description

JSObject is a Java class, not a JavaScript object; it cannot be used in your JavaScript programs. Instead, the JSObject is used by Java applets that wish to communicate with JavaScript by reading and writing JavaScript properties and array elements, invoking JavaScript methods, and evaluating and executing arbitrary strings of JavaScript code. Obviously, since JSObject is a Java class, you must understand Java programming in order to use it.

Full details on programming with the JSObject can be found in Chapter 23.

25.183.4. See Also

Chapter 23, Chapter 12 ; JavaObject in Part III




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net