JavaScript Limitations
The following lists some limitations of the Arbortext Editor JavaScript implementation.
• The Mozilla Rhino JavaScript interpreter does not support the
netscape.javascript.JSObject class as part of LiveConnect. It uses a different mechanism for accessing JavaScript objects from Java. See Requirements and Limitations at the Mozilla web page
developer.mozilla.org/en-US/docs/Web for additional limitations of the interpreter, and the Mozilla web page
developer.mozilla.org/en-US/docs/Web/Tutorials for a description of using JavaScript objects from Java.
• Strings returned by AOM/DOM methods are Java String objects and not JavaScript String objects. While Java String objects share many of the same methods as JavaScript String objects (for example, charAt, substring, toLowerCase) and can be used in string contexts, they are not equivalent. In particular, Java String has no length property; use the length() method instead. Also, Java String is not automatically converted to a number when used in a numeric context. To explicitly convert a Java String to a number when appropriate, use the parseInt or parseFloat function.
To perform JavaScript-style string manipulations on a Java String returned by the AOM, convert the string to a JavaScript String by concatenating it with a null string. For example:
var jsStr = doc.documentElement.tagName + "";