Some questions regarding the DOM and what it exactly is.
When I access document
via console.dir
I get all the properties of document
like this:
When I do a console.log
I get something which looks more like the DOM:
Questions:
- In my understanding the second object which we get from
console.log()
is the DOM. and the one fromconsole.dir()
is the DOM and all the Javascript properties which exists on the DOM. Is this correct? - Is the DOM is a Javascript object?
- Can we access the DOM structure of element nodes which we get from
console.log(window.document)
from a property ofconsole.dir(window.document)
?