Sample JavaScript Code
Sample JavaScript code that uses the JavaScript AOM interface is included in the Arbortext-path\samples\javascript directory. The readme.txt file in this directory provides a description of the sample code and how to invoke the sample scripts. The samples include examples of using the DOM to manipulate the active document, registering DOM Event handlers, using Java AWT classes, and transferring arrays between JavaScript and ACL.
There is a sample from the Mozilla Rhino distribution that implements a JavaScript File class in Java and an example script, jsdoc.js, that uses the defineClass JavaScript extension to define the File class.
Refer to Rhino Examples at the Mozilla web page (
www.mozilla.org/rhino/examples.html) for additional sample JavaScript scripts.