Something Old, Something New

The title of this section is from that old wedding rhyme about what a Western bride carries on her wedding day:

Something old, something new; something borrowed, something blue

Old, new, borrowed, and blue are all adjectives that can be used to describe the experience of creating applications that move between the different levels of the DOM, or from the BOM to the newer DOM.

Many of the existing JavaScript libraries or sample scripts still use technologies that worked with the old 4.x browsers popular in the late 1990s. With IE 4.x and Navigator 4.x, JavaScript and DHTML really took off, so it’s not surprising that much of these older scripts are still easily available. Particularly since many of them still work.

Today, modern browsers such as IE, Firefox, Mozilla, Navigator, Opera, Safari, Camino, and others adhere to the W3C as much as possible. I emphasize the last phrase because it has a great deal of meaning in cross-browser and cross-version web-page development. The possibilities are limited by how widespread the use of some technologies are. For instance, Microsoft’s newer IE 7 supports the newer DOM, up to the point where support would mean breaking older web pages. The company isn’t necessarily ready to break backward compatibility, and though not doing so is a pain for web developers, it’s also somewhat understandable.

So modern browsers borrow some of the older implementations, as well as support the newer. Developers use a variety of ...

Get Learning JavaScript 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.