Readonly
activeReturns the deepest element in the document through which or to which key events are being routed. This is, roughly speaking, the focused element in the document.
For the purposes of this API, when a child browsing context is focused, its container is focused in the parent browsing context. For example, if the user moves the focus to a text control in an iframe, the iframe is the element returned by the activeElement API in the iframe's node document.
Similarly, when the focused element is in a different node tree than documentOrShadowRoot, the element returned will be the host that's located in the same node tree as documentOrShadowRoot if documentOrShadowRoot is a shadow-including inclusive ancestor of the focused element, and null if not.
Returns or sets the color of an active link in the document body.
Readonly
allThe Document interface's read-only all
property returns an HTMLAllCollection rooted at the document node.
Readonly
anchorsThe anchors
read-only property of the An HTMLCollection.
Readonly
appletsThe applets
property of the Document returns an empty HTMLCollection.
Readonly
ATTRIBUTE_Readonly
baseThe read-only baseURI
property of the Node interface returns the absolute base URL of the document containing the node.
The deprecated bgColor
property gets or sets the background color of the current document.
The Document.body
property represents the null
if no such element exists.
Readonly
CDATA_node is a CDATASection node.
Readonly
characterThe Document.characterSet
read-only property returns the character encoding of the document that it's currently rendered with.
Readonly
charsetReadonly
childReadonly
childThe read-only childNodes
property of the Node interface returns a live the first child node is assigned index 0
.
Readonly
childrenReturns the child elements.
Readonly
COMMENT_node is a Comment node.
Readonly
compatThe Document.compatMode
read-only property indicates whether the document is rendered in Quirks mode or Standards mode.
Readonly
contentThe Document.contentType
read-only property returns the MIME type that the document is being rendered as.
The Document property cookie
lets you read and write cookies associated with the document.
Readonly
currentThe Document.currentScript
property returns the script element whose script is currently being processed and isn't a JavaScript module.
Readonly
defaultIn browsers, document.defaultView
returns the This property is read-only.
document.designMode
controls whether the entire document is editable.
The Document.dir
property is a string representing the directionality of the text of the document, whether left to right (default) or right to left.
Readonly
doctypeThe doctype
read-only property of the Document interface is a DocumentType object representing the Doctype associated with the current document.
Readonly
DOCUMENT_node is a DocumentFragment node.
Readonly
DOCUMENT_node is a document.
Readonly
DOCUMENT_Set when other is a descendant of node.
Readonly
DOCUMENT_Set when other is an ancestor of node.
Readonly
DOCUMENT_Set when node and other are not in the same tree.
Readonly
DOCUMENT_Set when other is following node.
Readonly
DOCUMENT_Readonly
DOCUMENT_Set when other is preceding node.
Readonly
DOCUMENT_node is a doctype.
Readonly
documentThe documentElement
read-only property of the Document interface returns the example, the html element for HTML documents).
Readonly
documentThe documentURI
read-only property of the A string.
The domain
property of the Document interface gets/sets the domain portion of the origin of the current document, as used by the same-origin policy.
Readonly
ELEMENT_node is an element.
Readonly
embedsThe embeds
read-only property of the An HTMLCollection.
Readonly
ENTITY_Readonly
ENTITY_fgColor
gets/sets the foreground color, or text color, of the current document.
Readonly
firstThe read-only firstChild
property of the Node interface returns the node's first child in the tree, or null
if the node has no children.
Readonly
firstReturns the first child that is an element, and null otherwise.
Readonly
fontsReadonly
formsThe forms
read-only property of the Document interface returns an HTMLCollection listing all the form elements contained in the document.
Readonly
fragmentThe fragmentDirective
read-only property of the Document interface returns the FragmentDirective for the current document.
Readonly
fullscreenThe obsolete Document interface's fullscreen
read-only property reports whether or not the document is currently displaying content in fullscreen mode.
Readonly
fullscreenReturns document's fullscreen element.
Readonly
fullscreenThe read-only fullscreenEnabled
property on the Document interface indicates whether or not fullscreen mode is available.
Readonly
headThe head
read-only property of the Document interface returns the head element of the current document.
Readonly
hiddenThe Document.hidden
read-only property returns a Boolean value indicating if the page is considered hidden or not.
Readonly
imagesThe images
read-only property of the Document interface returns a collection of the images in the current HTML document.
Readonly
implementationThe Document.implementation
property returns a A DOMImplementation object.
Readonly
inputReadonly
isThe read-only isConnected
property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.
Readonly
lastThe read-only lastChild
property of the Node interface returns the last child of the node, or null
if there are no child nodes.
Readonly
lastReturns the last child that is an element, and null otherwise.
Readonly
lastThe lastModified
property of the Document interface returns a string containing the date and local time on which the current document was last modified.
The Document.linkColor
property gets/sets the color of links within the document.
Readonly
linksThe links
read-only property of the Document interface returns a collection of all area elements and a elements in a document with a value for the href attribute.
Readonly
nextThe read-only nextSibling
property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null
if the specified node is the last child in the parent element.
Readonly
nodeThe read-only nodeName
property of Node returns the name of the current node as a string.
Readonly
nodeThe read-only nodeType
property of a Node interface is an integer that identifies what the node is.
The nodeValue
property of the Node interface returns or sets the value of the current node.
Readonly
NOTATION_Available only in secure contexts.
Optional
ontouchcancelOptional
ontouchendOptional
ontouchmoveOptional
ontouchstartReadonly
ownerThe read-only ownerDocument
property of the Node interface returns the top-level document object of the node.
Readonly
parentThe read-only parentElement
property of Node interface returns the DOM node's parent Element, or null
if the node either has no parent, or its parent isn't a DOM Element.
Readonly
parentThe read-only parentNode
property of the Node interface returns the parent of the specified node in the DOM tree.
Readonly
pictureReadonly
pictureThe read-only pictureInPictureEnabled
property of the available.
Readonly
pluginsThe plugins
read-only property of the containing one or more HTMLEmbedElements representing the An HTMLCollection.
Readonly
pointerReadonly
previousThe read-only previousSibling
property of the Node interface returns the node immediately preceding the specified one in its parent's or null
if the specified node is the first in that list.
Readonly
PROCESSING_node is a ProcessingInstruction node.
Readonly
readyThe Document.readyState
property describes the loading state of the document.
Readonly
referrerThe Document.referrer
property returns the URI of the page that linked to this page.
Readonly
rootDocument.rootElement
returns the Element that is the root element of the document if it is an documents.
Readonly
scriptsThe scripts
property of the Document interface returns a list of the script elements in the document.
Readonly
scrollingThe scrollingElement
read-only property of the scrolls the document.
Readonly
styleReadonly
TEXT_node is a Text node.
Readonly
timelineThe timeline
readonly property of the Document interface represents the default timeline of the current document.
The document.title
property gets or sets the current title of the document.
Readonly
URLThe URL
read-only property of the Document interface returns the document location as a string.
Readonly
visibilityThe Document.visibilityState
read-only property returns the visibility of the document.
The Document.vlinkColor
property gets/sets the color of links that the user has visited in the document.
The Document.location
read-only property returns a and provides methods for changing that URL and loading another URL.
The addEventListener()
method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optional
options: boolean | AddEventListenerOptionsThe addEventListener()
method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optional
options: boolean | AddEventListenerOptionsInserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
The caretPositionFromPoint()
method of the Document interface returns a CaretPosition object, containing the DOM node, along with the caret and caret's character offset within that node.
Optional
options: CaretPositionFromPointOptionsThe cloneNode()
method of the Node interface returns a duplicate of the node on which this method was called.
Optional
subtree: booleanThe Document.close()
method finishes writing to a document, opened with Document.open().
The compareDocumentPosition()
method of the Node interface reports the position of its argument node relative to the node on which it is called.
The contains()
method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.
The Document.createAttribute()
method creates a new attribute node, and returns it.
The Document.createAttributeNS()
method creates a new attribute node with the specified namespace URI and qualified name, and returns it.
createCDATASection()
creates a new CDATA section node, and returns it.
Creates a new empty DocumentFragment into which DOM nodes can be added to build an offscreen DOM tree.
In an HTML document, the document.createElement()
method creates the HTML element specified by localName
, or an HTMLUnknownElement if localName
isn't recognized.
Optional
options: ElementCreationOptionsOptional
options: ElementCreationOptionsOptional
options: ElementCreationOptionsCreates an element with the specified namespace URI and qualified name.
Optional
options: ElementCreationOptionsOptional
options: string | ElementCreationOptionsCreates an event of the type specified.
Optional
resolver: null | XPathNSResolverThe Document.createNodeIterator()
method returns a new NodeIterator
object.
Optional
whatToShow: numberOptional
filter: null | NodeFiltercreateProcessingInstruction()
generates a new processing instruction node and returns it.
The Document.createRange()
method returns a new js-nolint createRange()
None.
The Document.createTreeWalker()
creator method returns a newly created TreeWalker object.
Optional
whatToShow: numberOptional
filter: null | NodeFilterThe dispatchEvent()
method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Optional
resolver: null | XPathNSResolverOptional
type: numberOptional
result: null | XPathResultThe Document method exitFullscreen()
requests that the element on this document which is currently being presented in fullscreen mode be taken out of fullscreen mode, restoring the previous state of the screen.
The exitPictureInPicture()
method of the Document interface requests that a video contained in this document, which is currently floating, be taken out of picture-in-picture mode, restoring the previous state of the screen.
The exitPointerLock()
method of the Document interface asynchronously releases a pointer lock previously requested through Element.requestPointerLock.
Returns the first element within node's descendants whose ID is elementId.
The getElementsByClassName
method of of all child elements which have all of the given class name(s).
The getElementsByName()
method of the Document object returns a NodeList Collection of elements with a given name
attribute in the document.
The getElementsByTagName
method of The complete document is searched, including the root node.
Returns a list of elements with the given tag name belonging to the given namespace.
The getRootNode()
method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
Optional
options: GetRootNodeOptionsThe getSelection()
method of the Document interface returns the Selection object associated with this document, representing the range of text selected by the user, or the current position of the caret.
The hasChildNodes()
method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.
The hasFocus()
method of the Document interface returns a boolean value indicating whether the document or any element inside the document has focus.
The hasStorageAccess()
method of the Document interface returns a Promise that resolves with a boolean value indicating whether the document has access to third-party, unpartitioned cookies.
The Document object's importNode()
method creates a copy of a inserted into the current document later.
Optional
options: boolean | ImportNodeOptionsThe isDefaultNamespace()
method of the Node interface accepts a namespace URI as an argument.
The isEqualNode()
method of the Node interface tests whether two nodes are equal.
The isSameNode()
method of the Node interface is a legacy alias the for the ===
strict equality operator.
The lookupNamespaceURI()
method of the Node interface takes a prefix as parameter and returns the namespace URI associated with it on the given node if found (and null
if not).
The lookupPrefix()
method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null
if not.
The normalize()
method of the Node interface puts the specified node and all of its sub-tree into a normalized form.
Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
Returns the first element that is a descendant of node that matches selectors.
Returns all element descendants of node that match selectors.
The removeEventListener()
method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optional
options: boolean | EventListenerOptionsThe removeEventListener()
method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optional
options: boolean | EventListenerOptionsReplace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.
Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
The requestStorageAccess()
method of the Document interface allows content loaded in a third-party context (i.e., embedded in an iframe) to request access to third-party cookies and unpartitioned state.
The startViewTransition()
method of the Document interface starts a new same-document (SPA) view transition and returns a ViewTransition object to represent it.
Optional
callbackOptions: ViewTransitionUpdateCallback | StartViewTransitionOptionsThe writeln()
method of the Document interface writes text in one or more TrustedHTML or string parameters to a document stream opened by document.open(), followed by a newline character.
The XMLDocument interface represents an XML document.
MDN Reference