document object

The global object that represents the loaded page and is the root of the DOM tree, with methods such as querySelector and createElement.

In more detail

document.documentElement is the html element and document.body is the body. Workers cannot access document because they run away from the page's DOM.

Related terms

Taught in

References