<li>All functionality in your application should be verified. For example, if you wish to
access the HTML DOM you need to verify that it exists and has all the functions that
you need to use it (e.g., if ( document && document.getElementById ) ). This technique
is discussed in Chapter 2.
<li>Use the DOM to quickly and uniformly access elements in your document. Since you
already know that the browser supports DOM functions, you can feel free to write your
code simply and without hacks or kludges.
<li>Finally, you dynamically bind all events to the document using the DOM and your
addEvent function. Nowhere must you have something such as this: <a href="#"
onclick="doStuff();">…</a>. This is very bad in the eyes of coding unobtrusively, as
version of a browser that you don’t support. Since you’re just pointing the user to a
nonsensical URL, it will give no interaction to users who are unable to support your
installed at all, or that his browser may be inferior in some way. Go ahead, open your browser,
you still navigate to where you need to go? Finally, is it possible to use your site without a mouse?
All of these should be part of the ultimate goal for your web site. Thankfully, since you’ve built up
is negligible and can be done with minimal effort.</p>