10. The DOM

This chapter could easily be titled something like “Scripting HTML,” but the DOM is such an important concept that it deserves marquee status. DOM stands for “Document Object Model,” which is a concise way of explaining exactly what it is: the model (or representation) for the objects in an HTML document. More specifically, it is a hierarchy of data types for HTML documents, links, forms, comments, and everything else that can be represented in HTML code.

Like everything else in client-side scripting, the DOM has a muddy history, and resulting implementations across browsers are more complicated for it. Web standards have smoothed out many rough edges, but you still have to account for missing methods and differences in implementations, ...

Get The JavaScript PocketGuide 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.