JavaScript: The Definitive Guide

Previous Chapter 21
JavaScript Reference
Next
 

JSObject.toString() Java Method

Name

JSObject.toString() Java Method---return the string value of a JavaScript object

Availability

Part of the netscape.javascript package included with Navigator 3.0

Synopsis

public String toString()

Arguments

none

Returns

The string returned by invoking the toString() method of the JavaScript object represented by the specified Java JSObject.

Description

The toString() method of the Java JSObject class invokes the JavaScript toString() method of the JavaScript object represented by a JSObject and returns the result of that method.

Because the Java toString() method of a JSObject simply invokes the JavaScript toString() method of the JavaScript object represented by that JSObject, Java is guaranteed to convert any JSObject to a string in the same way that JavaScript does.

See Also

"JSObject", Chapter 19, LiveConnect: JavaScript and Java


Previous Home Next
JSObject.setSlot() Book Index Link

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell