As you read properties of JSObjects, you get more JSObjects returned. In this way, you can walk the document hierarchy to locate any item in the window referred to by the root JSObject.
The return values will conform to the following conversions as they are passed between the environments:
| JavaScript | Java |
|---|---|
| boolean primitive | java.lang.Boolean |
| number primitive | java.lang.Double |
| string primitive | java.lang.String |
| JavaObject object | The encapsulated Java object unwrapped |
| all other JavaScript objects | netscape.javascript.JSObject |
The result of this method call will be an Object object which needs to be cast to some other value for use in the Java environment.
| See also: | JavaScript to Java values, JSObject object, LiveConnect |
| Prev | Home | Next |
| JSObject.eval() | Up | JSObject.getSlot() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||