ReadonlyactiveReturns 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.
ReadonlyallThe Document interface's read-only all property returns an HTMLAllCollection rooted at the document node.
ReadonlyanchorsThe anchors read-only property of the An HTMLCollection.
ReadonlyappletsThe applets property of the Document returns an empty HTMLCollection.
ReadonlyATTRIBUTE_ReadonlybaseThe 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.
ReadonlyCDATA_node is a CDATASection node.
ReadonlycharacterThe Document.characterSet read-only property returns the character encoding of the document that it's currently rendered with.
ReadonlycharsetReadonlychildReadonlychildThe read-only childNodes property of the Node interface returns a live the first child node is assigned index 0.
ReadonlychildrenReturns the child elements.
ReadonlyCOMMENT_node is a Comment node.
ReadonlycompatThe Document.compatMode read-only property indicates whether the document is rendered in Quirks mode or Standards mode.
ReadonlycontentThe 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.
ReadonlycurrentThe Document.currentScript property returns the script element whose script is currently being processed and isn't a JavaScript module.
ReadonlydefaultIn 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.
ReadonlydoctypeThe doctype read-only property of the Document interface is a DocumentType object representing the Doctype associated with the current document.
ReadonlyDOCUMENT_node is a DocumentFragment node.
ReadonlyDOCUMENT_node is a document.
ReadonlyDOCUMENT_Set when other is a descendant of node.
ReadonlyDOCUMENT_Set when other is an ancestor of node.
ReadonlyDOCUMENT_Set when node and other are not in the same tree.
ReadonlyDOCUMENT_Set when other is following node.
ReadonlyDOCUMENT_ReadonlyDOCUMENT_Set when other is preceding node.
ReadonlyDOCUMENT_node is a doctype.
ReadonlydocumentThe documentElement read-only property of the Document interface returns the example, the html element for HTML documents).
ReadonlydocumentThe 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.
ReadonlyELEMENT_node is an element.
ReadonlyembedsThe embeds read-only property of the An HTMLCollection.
ReadonlyENTITY_ReadonlyENTITY_fgColor gets/sets the foreground color, or text color, of the current document.
ReadonlyfirstThe 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.
ReadonlyfirstReturns the first child that is an element, and null otherwise.
ReadonlyfontsReadonlyformsThe forms read-only property of the Document interface returns an HTMLCollection listing all the form elements contained in the document.
ReadonlyfragmentThe fragmentDirective read-only property of the Document interface returns the FragmentDirective for the current document.
ReadonlyfullscreenThe obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.
ReadonlyfullscreenReturns document's fullscreen element.
ReadonlyfullscreenThe read-only fullscreenEnabled property on the Document interface indicates whether or not fullscreen mode is available.
ReadonlyheadThe head read-only property of the Document interface returns the head element of the current document.
ReadonlyhiddenThe Document.hidden read-only property returns a Boolean value indicating if the page is considered hidden or not.
ReadonlyimagesThe images read-only property of the Document interface returns a collection of the images in the current HTML document.
ReadonlyimplementationThe Document.implementation property returns a A DOMImplementation object.
ReadonlyinputReadonlyisThe read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.
ReadonlylastThe read-only lastChild property of the Node interface returns the last child of the node, or null if there are no child nodes.
ReadonlylastReturns the last child that is an element, and null otherwise.
ReadonlylastThe 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.
ReadonlylinksThe 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.
ReadonlynextThe 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.
ReadonlynodeThe read-only nodeName property of Node returns the name of the current node as a string.
ReadonlynodeThe 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.
ReadonlyNOTATION_Available only in secure contexts.
OptionalontouchcancelOptionalontouchendOptionalontouchmoveOptionalontouchstartReadonlyownerThe read-only ownerDocument property of the Node interface returns the top-level document object of the node.
ReadonlyparentThe 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.
ReadonlyparentThe read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.
ReadonlypictureReadonlypictureThe read-only pictureInPictureEnabled property of the available.
ReadonlypluginsThe plugins read-only property of the containing one or more HTMLEmbedElements representing the An HTMLCollection.
ReadonlypointerReadonlypreviousThe 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.
ReadonlyPROCESSING_node is a ProcessingInstruction node.
ReadonlyreadyThe Document.readyState property describes the loading state of the document.
ReadonlyreferrerThe Document.referrer property returns the URI of the page that linked to this page.
ReadonlyrootDocument.rootElement returns the Element that is the root element of the document if it is an documents.
ReadonlyscriptsThe scripts property of the Document interface returns a list of the script elements in the document.
ReadonlyscrollingThe scrollingElement read-only property of the scrolls the document.
ReadonlystyleReadonlyTEXT_node is a Text node.
ReadonlytimelineThe 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.
ReadonlyURLThe URL read-only property of the Document interface returns the document location as a string.
ReadonlyvisibilityThe 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.
Optionaloptions: 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.
Optionaloptions: 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.
Optionaloptions: CaretPositionFromPointOptionsThe cloneNode() method of the Node interface returns a duplicate of the node on which this method was called.
Optionalsubtree: 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.
Optionaloptions: ElementCreationOptionsOptionaloptions: ElementCreationOptionsOptionaloptions: ElementCreationOptionsCreates an element with the specified namespace URI and qualified name.
Optionaloptions: ElementCreationOptionsOptionaloptions: string | ElementCreationOptionsCreates an event of the type specified.
Optionalresolver: XPathNSResolver | nullThe Document.createNodeIterator() method returns a new NodeIterator object.
OptionalwhatToShow: numberOptionalfilter: NodeFilter | nullcreateProcessingInstruction() 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.
OptionalwhatToShow: numberOptionalfilter: NodeFilter | nullThe dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Optionalresolver: XPathNSResolver | nullOptionaltype: numberOptionalresult: XPathResult | nullThe 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.
Optionaloptions: 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.
Optionaloptions: 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.
Optionaloptions: boolean | EventListenerOptionsThe removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optionaloptions: 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.
OptionalcallbackOptions: 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