11 ms·
Thanks everyone for the answers. I researched this a little more and can summarize it as: - DOM is a language agnostic representation that models an XML/HTML
by maksimur 4y ago
Thanks everyone for the answers. I researched this a little more and can summarize it as:
- DOM is a language agnostic representation that models an XML/HTML document as an object (abstract) tree, though as I said above the tree part is not mandated by the specs.
- The actual implementation can choose to expose extra data and methods for interacting with such objects. In the case of most browsers it's implemented as a Javascript document object (an actual Javascript object) "sitting" inside another Javascript object called window which exposes other properties and methods for interaction purposes.