The Document Object Model
In the JavaScript document object model (DOM), the primary document is an HTML page. As noted, the Window object, which includes frames, is at the top of the web browser hierarchy. However, the Document object contains the properties whose information is used by JavaScript. To strip away the mystery of what a DOM actually is, think of it as the Document object and all of its properties, including methods. Statements such as document.write() constitute the object (document) and a property/method (write()) that make up part of the model. To oversimplify a bit, you can say that the JavaScript DOM is the sum total of the Document object’s properties and methods, including the arrays automatically generated on an HTML page, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access