The Document Object Model
You've used the Document Object Model throughout this book, but we've never really stopped to formally examine it. This section will consider the various parts of the DOM and how they're put together.
There are four basic components of the DOM:
The document object—This is the overall container of the data and all other components, such as the comment and processing instruction nodes.
The node object—This is each individual component of the document. Nodes are defined by pairs of opening and closing tags.
The nodelist object—This is a list of nodes that are all at the same level. The nodes of the list all have the relative relationship of sibling.
The parseError object—This is a singleton object created for each document ...
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