LiveConnect and JavaScript Wrappers
From the LiveConnect page on the Mozilla web site:
LiveConnect is the name of an application programming interface that provides JavaScript with the ability to call methods of Java classes and vice-versa using the existing Java infrastructure.
LiveConnect use by applets is enabled via the use of the "MAYSCRIPT" attribute in applet tags on an HTML page, following which the applet may refer to classes in the netscape.javascript package to access Javascript objects, and scripts may directly call applet methods (using the syntax document.applets.name.methodName()
).
From the LiveConnect Overview page on the same site:
netscape.javascript.JSObject
and passed to Java.When a JavaScript object is sent to Java, the runtime engine creates a Java wrapper of type JSObject
; when a JSObject
is sent from Java to JavaScript, the runtime engine unwraps it to its original JavaScript object type. The JSObject
class provides an interface for invoking JavaScript methods and examining JavaScript properties.
The LiveConnect page has a number of dead links, including one called "LiveConnect Testcases", which sounded interesting, and another called "Core JavaScript 1.5 Reference: LiveConnect". I found a current JavaScript Reference page, but I could find no reference to LiveConnect on the page.
Comments