Javascript window.document in console

In javascript, when I access the window through the Chrome console, and then go to the document property, I get an object with many kinds of properties: Document DOM

But when I access a document like this window.document in the console, I get another object:

enter image description here

The latter looks like a DOM API, which we can use to control HTML.

Question:

Why do we get different document objects when accessing the document object in the above ways?

+5
source share

Source: https://habr.com/ru/post/1273515/


All Articles