[Appendix D] JavaScript Incompatibilities in Internet Explorer 3.0
Author: David Flanagan
Date: Fri Aug 29 10:43:50 1997

#

| Appendix D |

# D. JavaScript Incompatibilities in Internet Explorer 3.0

Contents:
Language Version
Case Sensitivity
Form Values and String Conversion
Object Model Differences
Garbage Collection
Security
Communication with Java
Supported but Nonfunctional Properties
Miscellaneous Differences

There are quite a few differences between the version of JavaScript supported by Internet Explorer 3.0 and those "definitive" versions supported by Navigator 2.0 and 3.0. This is understandable, because although Netscape calls JavaScript an "open" standard, they weren't ready to release the implementation of their incomplete Navigator 2.0 version of it. Therefore Microsoft was left in the position of reverse-engineering the language on a tight release schedule.

Because of the incompatibilities between the Microsoft and Netscape versions of JavaScript, it can be frustrating to write JavaScript code that works correctly on both platforms, and some programmers may simply choose to avoid the issue by writing code for JavaScript 1.1 only, and requiring users to use Navigator 3.0 or a later version. Compatibility with Internet Explorer 3.0 can be acheived, however, and the partial list of differences in this appendix should help. Note that you'll also find these differences detailed througout the chapters and reference pages of this book.

## D.1 Language Version

JavaScript in Internet Explorer was developed during the Navigator 3.0 beta cycle, so the Microsoft engineers modeled it mostly after the stable Navigator 2.0 platform. As a result, IE 3.0 supports a version of JavaScript that is essentially JavaScript 1.0. This means that IE does not support many of the interesting new features of JavaScript 1.1: the Image object, the Plugin and MimeType objects, the Number and Boolean objects, and so forth. It does not define `applets[]` or `embeds[]` arrays in the Document object. Because it does not support the Number object, it does not define the `MAX_VALUE`, `MIN_VALUE`, and other constants that exist as properties of that object. Like Navigator 2.0 on most platforms, IE 3.0 does not support the Not-a-Number (`NaN`) value.

On the other hand, the Microsoft engineers did get a few important 1.1 features into their implementation. For example, IE 3.0 does support the `Window.opener` property, the `typeof` operator, and even object prototypes (although it doesn't work for strings.) IE 3.0 also supports the Array object of Navigator 3.0, although it does not support the `join()`, `sort()` and `reverse()` methods of that object.

Miscellaneous Changes |  | Case Sensitivity