Web servers - JavaScript Programmer’s Reference The Java applet itself is
JavaScript Programmer’s Reference The Java applet itself is the concrete object whose properties are accessed. In Netscape, Applets are encapsulated as instances of the JavaObject class and communicate by means of the LiveConnect support. The mechanisms are quire different in MSIE, which uses ActiveX facilities to access applets. When you access an Applet(JavaObject) object, you are really interacting with the Java applet itself. The publicly accessible properties and methods depend on the applet, although all applets must support the start() and stop() methods. It is generally safer to interact with methods that you have provided as custom additions to the applet, rather than hope that the applet supports any particular methods. Because Java is so much more strongly data-typed than JavaScript, you must be careful with the kind of values you try and send to and receive from a Java applet. Java will also not forgive the omission of an argument. In JavaScript, all arguments are assumed to be optional as a general rule, although leaving them out will have strange side effects sometimes. Java will not allow you to do this and a run-time error will be generated if the arguments are not complete and all of the correct type. In Netscape, you can build an enumerator loop to examine all the properties of an Applet object. Enumerating applet interfaces like this will yield a long list of function objects. Each function object represents an accessor for internal properties of the Java environment. Your applet may publish additional properties. With these functions, you can enquire about certain attributes of the applet and can change some of them from the script. Refer to the JavaObject topic for details about these generic capabilities, but bear in mind they only work in Netscape. In MSIE, the APPLET object inherits its behavior from the Element object. Refer to the topic covering that for its generic properties and methods. MSIE supports many other properties and methods that are not generally available to Elementobjects and these are detailed here as properties and methods of the Applet object. Warnings: . MSIE implements this object as a member of the class APPLET rather than Applet as you would expect. . Netscape implements it as a member of the class JavaObject, although this is masked by some shortcomings in the implementation that prevent it from displaying its class type. .