New Features in this Release
-
Exception handling. You can throw and catch exceptions using the
throwandtry...catchstatements. See "throw" on page 243 and "try...catch" on page 246. -
New operators in and instanceof. The
inoperator returns true if the specified property is in the specified object; see "in" on page 269. Theinstanceofoperator returns true if the specified object is of the specified object type; see "instanceof" on page 270. - Changes to LiveConnect. Several changes to LiveConnect improve the way Java and JavaScript code communicate:
-
The methods of
java.lang.Objectare inherited byJavaArray. In addition, theJavaArrary.toStringmethod now calls the methodjava.lang.Object.toString. See "JavaArray" on page 98. -
You can pass a
JavaClassobject to a Java method which requires an argument of typejava.lang.Classinstead of creating a wrapper around an instance ofjava.lang.Class. See "JavaClass" on page 102. -
You cannot construct an instance of
JSExceptionwith a detail message. The three original public constructors for the Java classnetscape.javascript.JSExceptionthat supported this feature are deprecated. See "JSException" on page 280. -
You cannot use the == operator to compare two instances of
JSObject. UseJSObject.equals. See "Comparison Operators" on page 256 andJSObject.equals. - Changes to the eval method.
-
The top-level
evalmethod cannot be called indirectly. In previous versions, it was recommended that this method not be called indirectly; starting with JavaScript 1.4, callingevalindirectly could result in a runtime error. This change improves performance. See "eval" on page 214. -
The
evalmethod is no longer available as a method ofObject; use the top-levelevalfunction instead. See "eval" on page 214. - Changes to the Function object.
-
You should no longer specify a function name when using the
argumentsarray; theargumentsarray is a variable and is no longer a property ofFunctionobjects. This change improves performance. See "Function" on page 79 and "arguments" on page 85. -
Deprecated the
Function.arityproperty. It has been replaced by theFunction.lengthproperty. See "length" on page 92.
Table of Contents | Previous | Next | Index
Last Updated: 10/29/98 20:16:58
