19.2. Different Implementations

Unfortunately, as with many of the Web technologies, development of JavaScript and the DOM fractured over the next few years as other entities adopted and expanded the technologies. The largest gap was created around the DOM, an area of JavaScript long neglected by the Netscape team.

Contrary to popular belief, Microsoft did not initially fork the DOM for its own benefit. The DOM that existed in JavaScript around the release of Internet Explorer was plagued with bugs and was poorly implemented. The open source community and other user agent programmers banded together and embraced a DOM guideline constructed by the World Wide Web Consortium. The benefits of forking the DOM from the flawed Netscape implementation were seen and seized by many.

Despite the existence of a well-known standard, several entities have made subtle changes to their JavaScript implementations. Microsoft, for example, has tweaked its version of JavaScript (JScript), creating quite a few inconsistencies in implementation and use.

Unfortunately, this causes many problems for the scripting programmer who must create code that works on the majority of user agents.

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.