JavaScript defines hierarchy of objects on HTML page.
|
These objects are accessible from Java via LiveConnect mechanisms implemented in netscape.javascript. JSObject class.
-
Example: JSObject.getWindow(this) method returns the root of the JavaScript hierarchy; JSObject.getWindow(this).getMember("document").getMember(frame_name) returns JSObject representing Netscape frame with parameter name=frame_name
|
JavaScript is aware of Java objects and can call their methods directly.
-
Example: <script>package.class.method();</script>
|