HTMLDocument

For historical reasons, Window objects have a window.HTMLDocument property whose value is the Document interface. So you can think of HTMLDocument as an alias for Document, and you can find documentation for HTMLDocument members under the documentation for the Document interface.

Properties

Link copied to clipboard

The activeElement read-only property of the Document interface returns the Element within the DOM that is receiving keyboard events such as keydown and keyup. This is usually analogous to the focused element.

Link copied to clipboard

The activeViewTransition read-only property of the Document interface returns a ViewTransition instance representing the view transition currently active on the document.

Link copied to clipboard

The adoptedStyleSheets property of the Document interface is used for setting an array of constructed stylesheets to be used by the document.

Link copied to clipboard

The read-only baseURI property of the Node interface returns the absolute base URL of the document containing the node.

Link copied to clipboard

The Document.body property represents the or node of the current document, or null if no such element exists.

Link copied to clipboard

The Document.characterSet read-only property returns the character encoding of the document that it's currently rendered with.

Link copied to clipboard

The Document.childElementCount read-only property returns the number of child elements of the document.

Link copied to clipboard

The read-only childNodes property of the Node interface returns a live NodeList of child nodes of the given element where the first child node is assigned index 0. Child nodes include elements, text and comments.

Link copied to clipboard

The read-only children property returns a live HTMLCollection which contains all of the child elements of the document upon which it was called.

Link copied to clipboard

The Document.compatMode read-only property indicates whether the document is rendered in Quirks mode or Standards mode.

Link copied to clipboard

The Document.contentType read-only property returns the MIME type that the document is being rendered as. This may come from HTTP headers or other sources of MIME information, and might be affected by automatic type conversions performed by either the browser or extensions.

Link copied to clipboard

The Document property cookie lets you read and write cookies associated with the document. It serves as a getter and setter for the actual values of the cookies.

Link copied to clipboard

The Document.currentScript property returns the