Readonly
ATTRIBUTE_Readonly
CDATA_node is a CDATASection node.
Readonly
COMMENT_node is a Comment node.
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
ELEMENT_node is an element.
Readonly
ENTITY_Readonly
ENTITY_Readonly
NOTATION_Readonly
PROCESSING_node is a ProcessingInstruction node.
Readonly
TEXT_node is a Text node.
Readonly
URLSets or gets the URL for the current document.
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.
Sets or gets the color of all active links in the document.
Readonly
allReturns a reference to the collection of elements contained by the object.
Readonly
anchorsRetrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
Readonly
appletsRetrieves a collection of all applet objects in the document.
Readonly
baseURIReturns node's node document's document base URL.
Deprecated. Sets or retrieves a value that indicates the background color behind the object.
Specifies the beginning and end of the document body.
Readonly
characterReturns document's encoding.
Readonly
charsetGets or sets the character set used to encode the object.
Readonly
childReadonly
childReturns the children.
Readonly
childrenReturns the child elements.
Readonly
compatGets a value that indicates whether standards-compliant mode is switched on for the object.
Readonly
contentReturns document's content type.
Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.
Can be set, to add a new cookie to the element's set of HTTP cookies.
If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.
Readonly
currentReturns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.
Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.
Readonly
defaultReturns the Window object of the active document.
Sets or gets a value that indicates whether the document can be edited.
Sets or retrieves a value that indicates the reading order of the object.
Readonly
doctypeGets an object representing the document type declaration associated with the current document.
Readonly
documentGets a reference to the root node of the document.
Readonly
documentURIReturns document's URL.
Sets or gets the security domain of the document.
Readonly
embedsRetrieves a collection of all embed objects in the document.
Sets or gets the foreground (text) color of the document.
Readonly
firstReturns the first child.
Readonly
firstReturns the first child that is an element, and null otherwise.
Readonly
fontsReadonly
formsRetrieves a collection, in source order, of all form objects in the document.
Readonly
fullscreenReadonly
fullscreenReturns document's fullscreen element.
Readonly
fullscreenReturns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.
Readonly
headReturns the head element.
Readonly
hiddenReadonly
imagesRetrieves a collection, in source order, of img objects in the document.
Readonly
implementationGets the implementation object of the current document.
Readonly
inputReturns the character encoding used to create the webpage that is loaded into the document object.
Readonly
isReturns true if node is connected and false otherwise.
Readonly
lastReturns the last child.
Readonly
lastReturns the last child that is an element, and null otherwise.
Readonly
lastGets the date that the page was last modified, if the page supplies one.
Sets or gets the color of the document links.
Readonly
linksRetrieves a collection of all a objects that specify the href property and all area objects in the document.
Readonly
nextReturns the next sibling.
Readonly
nodeReturns a string appropriate for the type of node.
Readonly
nodeReturns the type of node.
Fires when the user aborts the download.
Fires when the object loses the input focus.
Occurs when playback is possible, but would require further buffering.
Fires when the contents of the object or selection have changed.
Fires when the user clicks the left mouse button on the object
Fires when the user clicks the right mouse button in the client area, opening the context menu.
Fires when the user double-clicks the object.
Fires on the source object continuously during a drag operation.
Fires on the source object when the user releases the mouse at the close of a drag operation.
Fires on the target element when the user drags the object to a valid drop target.
Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
Fires on the target element continuously while the user drags the object over a valid drop target.
Fires on the source object when the user starts to drag a text selection or selected object.
Occurs when the duration attribute is updated.
Occurs when the media element is reset to its initial state.
Occurs when the end of playback is reached.
Fires when an error occurs during object loading.
Fires when the object receives focus.
Fires when the user presses a key.
Fires when the user presses an alphanumeric key.
Fires when the user releases a key.
Fires immediately after the browser loads the object.
Occurs when media data is loaded at the current playback position.
Occurs when the duration and dimensions of the media have been determined.
Occurs when Internet Explorer begins looking for media data.
Fires when the user clicks the object with either mouse button.
Fires when the user moves the mouse over the object.
Fires when the user moves the mouse pointer outside the boundaries of the object.
Fires when the user moves the mouse pointer into the object.
Fires when the user releases a mouse button while the mouse is over the object.
Occurs when playback is paused.
Occurs when the play method is requested.
Occurs when the audio or video has started playing.
Occurs to indicate progress while downloading media data.
Occurs when the playback rate is increased or decreased.
Fires when the state of the object has changed.
Fires when the user resets a form.
Fires when the user repositions the scroll box in the scroll bar on the object.
Occurs when the seek operation ends.
Occurs when the current playback position is moved.
Fires when the current selection changes.
Occurs when the download has stopped.
Occurs if the load operation has been intentionally halted.
Occurs to indicate the current playback position.
Optional
ontouchcancelOptional
ontouchendOptional
ontouchmoveOptional
ontouchstartOccurs when the volume is changed, or playback is muted or unmuted.
Occurs when playback stops because the next frame of a video resource is not available.
Readonly
ownerReturns the node document. Returns null for documents.
Readonly
parentReturns the parent element.
Readonly
parentReturns the parent.
Readonly
pictureReadonly
pictureReadonly
pluginsReturn an HTMLCollection of the embed elements in the Document.
Readonly
pointerReadonly
previousReturns the previous sibling.
Readonly
readyRetrieves a value that indicates the current state of the object.
Readonly
referrerGets the URL of the location that referred the user to the current page.
Readonly
rootReadonly
scriptsRetrieves a collection of all script objects in the document.
Readonly
scrollingReadonly
styleRetrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
Readonly
timelineContains the title of the document.
Readonly
visibilitySets or gets the color of the links that the user has visited.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Optional
options: boolean | AddEventListenerOptionsAppends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
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.
Rest
...nodes: (string | Node)[]Returns a bitmask indicating the position of other relative to node.
Returns true if other is an inclusive descendant of node, and false otherwise.
Returns a CDATASection node whose data is data.
Creates a new document.
Creates an instance of the element for the specified tag.
The name of an element.
Optional
options: ElementCreationOptionsOptional
options: ElementCreationOptionsOptional
options: ElementCreationOptionsReturns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.
If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
If one of the following conditions is true a "NamespaceError" DOMException will be thrown:
localName does not match the QName production. Namespace prefix is not null and namespace is the empty string. Namespace prefix is "xml" and namespace is not the XML namespace. qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace. namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".
When supplied, options's is can be used to create a customized built-in element.
Optional
options: ElementCreationOptionsOptional
options: string | ElementCreationOptionsOptional
resolver: null | XPathNSResolverCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
The root element or node to start traversing on.
Optional
whatToShow: numberThe type of nodes or elements to appear in the node list
Optional
filter: null | NodeFilterA custom NodeFilter function to use. For more information, see filter. Use null for no filter.
Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.
Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
The root element or node to start traversing on.
Optional
whatToShow: numberThe type of nodes or elements to appear in the node list. For more information, see whatToShow.
Optional
filter: null | NodeFilterA custom NodeFilter function to use.
Optional
resolver: null | XPathNSResolverOptional
type: numberOptional
result: null | XPathResultExecutes a command on the current document, current selection, or the given range.
String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
Optional
showUI: booleanDisplay the user interface, defaults to false.
Optional
value: stringValue to assign.
Returns a reference to the first object with the specified value of the ID attribute.
String that specifies the ID value.
Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.
Gets a collection of objects based on the value of the NAME or ID attribute.
Gets a collection of objects based on the value of the NAME or ID attribute.
Retrieves a collection of objects based on the specified element name.
If namespace and localName are "*" returns a HTMLCollection of all descendant elements.
If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
Returns node's root.
Optional
options: GetRootNodeOptionsReturns whether node and otherNode have the same properties.
Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
Optional
unused1: stringOptional
unused2: stringInserts 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.
Rest
...nodes: (string | Node)[]Returns the first element that is a descendant of node that matches selectors.
Returns all element descendants of node that match selectors.
Removes the event listener in target's event listener list with the same type, callback, and options.
Optional
options: boolean | EventListenerOptionsRemoves the event listener in target's event listener list with the same type, callback, and options.
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.
Rest
...nodes: (string | Node)[]
Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.