XMLDocument
The XMLDocument interface represents an XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.
Extends
Accessors
location
Get Signature
get location(): Location;
The read-only location property of the Document interface returns a Location object, which contains information about the URL of the document and provides methods for changing that URL and loading another URL.
Returns
Set Signature
set location(href): void;
Parameters
| Parameter | Type |
|---|---|
href | string |
Returns
void
Inherited from
textContent
Get Signature
get textContent(): null;
Returns
null
The textContent property of the Node interface represents the text content of the node and its descendants.
Inherited from
Methods
addEventListener()
Call Signature
addEventListener<K>(
type,
listener,
options?
): void;
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Type Parameters
| Type Parameter |
|---|
K extends keyof DocumentEventMap |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, ev) => any |
options? | boolean | AddEventListenerOptions |
Returns
void
Overrides
Call Signature
addEventListener(
type,
listener,
options?
): void;
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Parameters
| Parameter | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | AddEventListenerOptions |
Returns
void
Overrides
adoptNode()
adoptNode<T>(node): T;
Document.adoptNode() transfers a node from another document into the method's document. The adopted node and its subtree are removed from their original document (if any), and their ownerDocument is changed to the current document. The node can then be inserted into the current document.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
Returns
T
Inherited from
append()
append(...nodes): void;
Inserts 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.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
appendChild()
appendChild<T>(node): T;
The appendChild() method of the Node interface adds a node to the end of the list of children of a specified parent node.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
Returns
T
Inherited from
captureEvents()
captureEvents(): void;
Returns
void
Deprecated
Inherited from
caretPositionFromPoint()
caretPositionFromPoint(
x,
y,
options?
): CaretPosition | null;
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.
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
options? | CaretPositionFromPointOptions |
Returns
CaretPosition | null
Inherited from
Document.caretPositionFromPoint
caretRangeFromPoint()
caretRangeFromPoint(x, y): Range | null;
The caretRangeFromPoint() method of the Document interface returns a Range object for the document fragment under the specified coordinates.
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Range | null
Deprecated
Inherited from
clear()
clear(): void;
The Document.clear() method does nothing, but doesn't raise any error.
Returns
void
Deprecated
Inherited from
cloneNode()
cloneNode(subtree?): Node;
The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called. Its parameter controls if the subtree contained in the node is also cloned or not.
Parameters
| Parameter | Type |
|---|---|
subtree? | boolean |
Returns
Inherited from
close()
close(): void;
The Document.close() method finishes writing to a document, opened with Document.open().
Returns
void
Inherited from
compareDocumentPosition()
compareDocumentPosition(other): number;
The compareDocumentPosition() method of the Node interface reports the position of its argument node relative to the node on which it is called.
Parameters
| Parameter | Type |
|---|---|
other | Node |
Returns
number
Inherited from
Document.compareDocumentPosition
contains()
contains(other): boolean;
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 (childNodes), one of the children's direct children, and so on.
Parameters
| Parameter | Type |
|---|---|
other | Node | null |
Returns
boolean
Inherited from
createAttribute()
createAttribute(localName): Attr;
The Document.createAttribute() method creates a new attribute node, and returns it. The object created is a node implementing the Attr interface. The DOM does not enforce what sort of attributes can be added to a particular element in this manner.
Parameters
| Parameter | Type |
|---|---|
localName | string |
Returns
Inherited from
createAttributeNS()
createAttributeNS(namespace, qualifiedName): Attr;
The Document.createAttributeNS() method creates a new attribute node with the specified namespace URI and qualified name, and returns it. The object created is a node implementing the Attr interface. The DOM does not enforce what sort of attributes can be added to a particular element in this manner.
Parameters
| Parameter | Type |
|---|---|
namespace | string | null |
qualifiedName | string |
Returns
Inherited from
createCDATASection()
createCDATASection(data): CDATASection;
createCDATASection() creates a new CDATA section node, and returns it.
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
Inherited from
createComment()
createComment(data): Comment;
createComment() creates a new comment node, and returns it.
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
Inherited from
createDocumentFragment()
createDocumentFragment(): DocumentFragment;
Creates a new empty DocumentFragment into which DOM nodes can be added to build an offscreen DOM tree.
Returns
Inherited from
Document.createDocumentFragment
createElement()
Call Signature
createElement<K>(tagName, options?): HTMLElementTagNameMap[K];
In an HTML document, the document.createElement() method creates the HTML element specified by localName, or an HTMLUnknownElement if localName isn't recognized.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
tagName | K |
options? | ElementCreationOptions |
Returns
Inherited from
Call Signature
createElement<K>(tagName, options?): HTMLElementDeprecatedTagNameMap[K];
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
tagName | K |
options? | ElementCreationOptions |
Returns
HTMLElementDeprecatedTagNameMap[K]
Deprecated
Inherited from
Call Signature
createElement(tagName, options?): HTMLElement;
Parameters
| Parameter | Type |
|---|---|
tagName | string |
options? | ElementCreationOptions |
Returns
Inherited from
createElementNS()
Call Signature
createElementNS(namespaceURI, qualifiedName): HTMLElement;
Creates an element with the specified namespace URI and qualified name.
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1999/xhtml" |
qualifiedName | string |
Returns
Inherited from
Call Signature
createElementNS<K>(namespaceURI, qualifiedName): SVGElementTagNameMap[K];
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/2000/svg" |
qualifiedName | K |
Returns
Inherited from
Call Signature
createElementNS(namespaceURI, qualifiedName): SVGElement;
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/2000/svg" |
qualifiedName | string |
Returns
Inherited from
Call Signature
createElementNS<K>(namespaceURI, qualifiedName): MathMLElementTagNameMap[K];
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1998/Math/MathML" |
qualifiedName | K |
Returns
Inherited from
Call Signature
createElementNS(namespaceURI, qualifiedName): MathMLElement;
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1998/Math/MathML" |
qualifiedName | string |
Returns
Inherited from
Call Signature
createElementNS(
namespaceURI,
qualifiedName,
options?
): Element;
Parameters
| Parameter | Type |
|---|---|
namespaceURI | string | null |
qualifiedName | string |
options? | ElementCreationOptions |
Returns
Inherited from
Call Signature
createElementNS(
namespace,
qualifiedName,
options?
): Element;
Parameters
| Parameter | Type |
|---|---|
namespace | string | null |
qualifiedName | string |
options? | string | ElementCreationOptions |
Returns
Inherited from
createEvent()
Call Signature
createEvent(eventInterface): AnimationEvent;
Creates an event of the type specified. The returned object should be first initialized and can then be passed to EventTarget.dispatchEvent.
Parameters
| Parameter | Type |
|---|---|
eventInterface | "AnimationEvent" |
Returns
Deprecated
Inherited from
Call Signature
createEvent(eventInterface): AnimationPlaybackEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "AnimationPlaybackEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): AudioProcessingEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "AudioProcessingEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): BeforeUnloadEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "BeforeUnloadEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): BlobEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "BlobEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): ClipboardEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "ClipboardEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): CloseEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "CloseEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): CommandEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "CommandEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): CompositionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "CompositionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): ContentVisibilityAutoStateChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "ContentVisibilityAutoStateChangeEvent" |
Returns
ContentVisibilityAutoStateChangeEvent
Inherited from
Call Signature
createEvent(eventInterface): CookieChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "CookieChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): CustomEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "CustomEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): DeviceMotionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "DeviceMotionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): DeviceOrientationEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "DeviceOrientationEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): DragEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "DragEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): ErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "ErrorEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): Event;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "Event" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): Event;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "Events" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): FocusEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "FocusEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): FontFaceSetLoadEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "FontFaceSetLoadEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): FormDataEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "FormDataEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): GPUUncapturedErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "GPUUncapturedErrorEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): GamepadEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "GamepadEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): HashChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "HashChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): IDBVersionChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "IDBVersionChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): InputEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "InputEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): KeyboardEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "KeyboardEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MIDIConnectionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MIDIConnectionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MIDIMessageEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MIDIMessageEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MediaEncryptedEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MediaEncryptedEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MediaKeyMessageEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MediaKeyMessageEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MediaQueryListEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MediaQueryListEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MediaStreamTrackEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MediaStreamTrackEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MessageEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MessageEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MouseEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MouseEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): MouseEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "MouseEvents" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): NavigateEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "NavigateEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): NavigationCurrentEntryChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "NavigationCurrentEntryChangeEvent" |
Returns
NavigationCurrentEntryChangeEvent
Inherited from
Call Signature
createEvent(eventInterface): OfflineAudioCompletionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "OfflineAudioCompletionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PageRevealEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PageRevealEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PageSwapEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PageSwapEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PageTransitionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PageTransitionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PaymentMethodChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PaymentMethodChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PaymentRequestUpdateEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PaymentRequestUpdateEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PictureInPictureEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PictureInPictureEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PointerEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PointerEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PopStateEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PopStateEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): ProgressEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "ProgressEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): PromiseRejectionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "PromiseRejectionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): RTCDTMFToneChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCDTMFToneChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): RTCDataChannelEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCDataChannelEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): RTCErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCErrorEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): RTCPeerConnectionIceErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCPeerConnectionIceErrorEvent" |
Returns
RTCPeerConnectionIceErrorEvent
Inherited from
Call Signature
createEvent(eventInterface): RTCPeerConnectionIceEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCPeerConnectionIceEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): RTCTrackEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "RTCTrackEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SecurityPolicyViolationEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SecurityPolicyViolationEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SpeechRecognitionErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SpeechRecognitionErrorEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SpeechRecognitionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SpeechRecognitionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SpeechSynthesisErrorEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SpeechSynthesisErrorEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SpeechSynthesisEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SpeechSynthesisEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): StorageEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "StorageEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): SubmitEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "SubmitEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): TaskPriorityChangeEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "TaskPriorityChangeEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): TextEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "TextEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): ToggleEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "ToggleEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): TouchEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "TouchEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): TrackEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "TrackEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): TransitionEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "TransitionEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): UIEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "UIEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): UIEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "UIEvents" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): WebGLContextEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "WebGLContextEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): WheelEvent;
Parameters
| Parameter | Type |
|---|---|
eventInterface | "WheelEvent" |
Returns
Inherited from
Call Signature
createEvent(eventInterface): Event;
Parameters
| Parameter | Type |
|---|---|
eventInterface | string |
Returns
Inherited from
createExpression()
createExpression(expression, resolver?): XPathExpression;
Parameters
| Parameter | Type |
|---|---|
expression | string |
resolver? | XPathNSResolver | null |
Returns
Inherited from
createNodeIterator()
createNodeIterator(
root,
whatToShow?,
filter?
): NodeIterator;
The Document.createNodeIterator() method returns a new NodeIterator object.
Parameters
| Parameter | Type |
|---|---|
root | Node |
whatToShow? | number |
filter? | NodeFilter | null |
Returns
Inherited from
createNSResolver()
createNSResolver(nodeResolver): Node;
Parameters
| Parameter | Type |
|---|---|
nodeResolver | Node |
Returns
Deprecated
Inherited from
createProcessingInstruction()
createProcessingInstruction(target, data): ProcessingInstruction;
createProcessingInstruction() generates a new processing instruction node and returns it.
Parameters
| Parameter | Type |
|---|---|
target | string |
data | string |
Returns
Inherited from
Document.createProcessingInstruction
createRange()
createRange(): Range;
The Document.createRange() method returns a new Range object whose start and end are offset 0 of the Document object on which it was called.
Returns
Inherited from
createTextNode()
createTextNode(data): Text;
Creates a new Text node. This method can be used to escape HTML characters.
Parameters
| Parameter | Type |
|---|---|
data | string |
Returns
Inherited from
createTreeWalker()
createTreeWalker(
root,
whatToShow?,
filter?
): TreeWalker;
The Document.createTreeWalker() creator method returns a newly created TreeWalker object.
Parameters
| Parameter | Type |
|---|---|
root | Node |
whatToShow? | number |
filter? | NodeFilter | null |
Returns
Inherited from
dispatchEvent()
dispatchEvent(event): boolean;
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
Parameters
| Parameter | Type |
|---|---|
event | Event |
Returns
boolean
Inherited from
elementFromPoint()
elementFromPoint(x, y): Element | null;
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Element | null
Inherited from
elementsFromPoint()
elementsFromPoint(x, y): Element[];
Parameters
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns
Element[]
Inherited from
evaluate()
evaluate(
expression,
contextNode,
resolver?,
type?,
result?
): XPathResult;
Parameters
| Parameter | Type |
|---|---|
expression | string |
contextNode | Node |
resolver? | XPathNSResolver | null |
type? | number |
result? | XPathResult | null |
Returns
Inherited from
execCommand()
execCommand(
commandId,
showUI?,
value?
): boolean;
The execCommand method implements multiple different commands. Some of them provide access to the clipboard, while others are for editing form inputs, contenteditable elements or entire documents (when switched to design mode).
Parameters
| Parameter | Type |
|---|---|
commandId | string |
showUI? | boolean |
value? | string |
Returns
boolean
Deprecated
Inherited from
exitFullscreen()
exitFullscreen(): Promise<void>;
The 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. This usually reverses the effects of a previous call to Element.requestFullscreen().
Returns
Promise<void>
Inherited from
exitPictureInPicture()
exitPictureInPicture(): Promise<void>;
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. This usually reverses the effects of a previous call to HTMLVideoElement.requestPictureInPicture().
Returns
Promise<void>
Inherited from
exitPointerLock()
exitPointerLock(): void;
The exitPointerLock() method of the Document interface asynchronously releases a pointer lock previously requested through Element.requestPointerLock.
Returns
void
Inherited from
getAnimations()
getAnimations(): Animation[];
Returns
Inherited from
getElementById()
getElementById(elementId): HTMLElement | null;
The getElementById() method of the Document interface returns an Element object representing the element whose id property matches the specified string. Since element IDs are required to be unique if specified, they're a useful way to get access to a specific element quickly.
Parameters
| Parameter | Type |
|---|---|
elementId | string |
Returns
HTMLElement | null
Inherited from
getElementsByClassName()
getElementsByClassName(classNames): HTMLCollectionOf<Element>;
The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class name(s).
Parameters
| Parameter | Type |
|---|---|
classNames | string |
Returns
Inherited from
Document.getElementsByClassName
getElementsByName()
getElementsByName(elementName): NodeListOf<HTMLElement>;
The getElementsByName() method of the Document object returns a NodeList Collection of elements with a given name attribute in the document.
Parameters
| Parameter | Type |
|---|---|
elementName | string |
Returns
Inherited from
getElementsByTagName()
Call Signature
getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
The getElementsByTagName method of Document interface returns an HTMLCollection of elements with the given tag name.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<HTMLElementTagNameMap[K]>
Inherited from
Call Signature
getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<SVGElementTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<SVGElementTagNameMap[K]>
Inherited from
Call Signature
getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<MathMLElementTagNameMap[K]>
Inherited from
Call Signature
getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
qualifiedName | K |
Returns
HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>
Deprecated
Inherited from
Call Signature
getElementsByTagName(qualifiedName): HTMLCollectionOf<Element>;
Parameters
| Parameter | Type |
|---|---|
qualifiedName | string |
Returns
Inherited from
getElementsByTagNameNS()
Call Signature
getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<HTMLElement>;
Returns a list of elements with the given tag name belonging to the given namespace. The complete document is searched, including the root node.
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1999/xhtml" |
localName | string |
Returns
Inherited from
Document.getElementsByTagNameNS
Call Signature
getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<SVGElement>;
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/2000/svg" |
localName | string |
Returns
Inherited from
Document.getElementsByTagNameNS
Call Signature
getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<MathMLElement>;
Parameters
| Parameter | Type |
|---|---|
namespaceURI | "http://www.w3.org/1998/Math/MathML" |
localName | string |
Returns
HTMLCollectionOf<MathMLElement>
Inherited from
Document.getElementsByTagNameNS
Call Signature
getElementsByTagNameNS(namespace, localName): HTMLCollectionOf<Element>;
Parameters
| Parameter | Type |
|---|---|
namespace | string | null |
localName | string |
Returns
Inherited from
Document.getElementsByTagNameNS
getRootNode()
getRootNode(options?): Node;
The getRootNode() method of the Node interface returns the context object's root, which optionally includes the shadow root if it is available.
Parameters
| Parameter | Type |
|---|---|
options? | GetRootNodeOptions |
Returns
Inherited from
getSelection()
getSelection(): Selection | null;
The 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.
Returns
Selection | null
Inherited from
hasChildNodes()
hasChildNodes(): boolean;
The hasChildNodes() method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.
Returns
boolean
Inherited from
hasFocus()
hasFocus(): boolean;
The hasFocus() method of the Document interface returns a boolean value indicating whether the document or any element inside the document has focus. This method can be used to determine whether the active element in a document has focus.
Returns
boolean
Inherited from
hasStorageAccess()
hasStorageAccess(): Promise<boolean>;
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.
Returns
Promise<boolean>
Inherited from
importNode()
importNode<T>(node, options?): T;
The importNode() method of the Document interface creates a copy of a Node or DocumentFragment from another document, to be inserted into the current document later.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
options? | boolean | ImportNodeOptions |
Returns
T
Inherited from
insertBefore()
insertBefore<T>(node, child): T;
The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | T |
child | Node | null |
Returns
T
Inherited from
isDefaultNamespace()
isDefaultNamespace(namespace): boolean;
The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument. It returns a boolean value that is true if the namespace is the default namespace on the given node and false if not. The default namespace can be retrieved with Node.lookupNamespaceURI() by passing null as the argument.
Parameters
| Parameter | Type |
|---|---|
namespace | string | null |
Returns
boolean
Inherited from
isEqualNode()
isEqualNode(otherNode): boolean;
The isEqualNode() method of the Node interface tests whether two nodes are equal. Two nodes are equal when they have the same type, defining characteristics (for elements, this would be their ID, number of children, and so forth), its attributes match, and so on. The specific set of data points that must match varies depending on the types of the nodes.
Parameters
| Parameter | Type |
|---|---|
otherNode | Node | null |
Returns
boolean
Inherited from
isSameNode()
isSameNode(otherNode): boolean;
The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator. That is, it tests whether two nodes are the same (in other words, whether they reference the same object).
Parameters
| Parameter | Type |
|---|---|
otherNode | Node | null |
Returns
boolean
Inherited from
lookupNamespaceURI()
lookupNamespaceURI(prefix): string | null;
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). This method's existence allows Node objects to be passed as a namespace resolver to XPathEvaluator.createExpression() and XPathEvaluator.evaluate().
Parameters
| Parameter | Type |
|---|---|
prefix | string | null |
Returns
string | null
Inherited from
lookupPrefix()
lookupPrefix(namespace): string | null;
The lookupPrefix() method of the Node interface returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the first prefix is returned.
Parameters
| Parameter | Type |
|---|---|
namespace | string | null |
Returns
string | null
Inherited from
moveBefore()
moveBefore(node, child): void;
Parameters
| Parameter | Type |
|---|---|
node | Node |
child | Node | null |
Returns
void
Inherited from
normalize()
normalize(): void;
The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form. In a normalized sub-tree, no text nodes in the sub-tree are empty and there are no adjacent text nodes.
Returns
void
Inherited from
open()
Call Signature
open(unused1?, unused2?): Document;
The Document.open() method opens a document for writing.
Parameters
| Parameter | Type |
|---|---|
unused1? | string |
unused2? | string |
Returns
Inherited from
Call Signature
open(
url,
name,
features
): Window | null;
Parameters
| Parameter | Type |
|---|---|
url | string | URL |
name | string |
features | string |
Returns
Window | null
Inherited from
prepend()
prepend(...nodes): void;
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.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
queryCommandEnabled()
queryCommandEnabled(commandId): boolean;
The Document.queryCommandEnabled() method reports whether or not the specified editor command is enabled by the browser.
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
boolean
Deprecated
Inherited from
queryCommandIndeterm()
queryCommandIndeterm(commandId): boolean;
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
boolean
Deprecated
Inherited from
queryCommandState()
queryCommandState(commandId): boolean;
The queryCommandState() method will tell you if the current selection has a certain Document.execCommand() command applied.
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
boolean
Deprecated
Inherited from
queryCommandSupported()
queryCommandSupported(commandId): boolean;
The Document.queryCommandSupported() method reports whether or not the specified editor command is supported by the browser.
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
boolean
Deprecated
Inherited from
Document.queryCommandSupported
queryCommandValue()
queryCommandValue(commandId): string;
Parameters
| Parameter | Type |
|---|---|
commandId | string |
Returns
string
Deprecated
Inherited from
querySelector()
Call Signature
querySelector<K>(selectors): HTMLElementTagNameMap[K] | null;
Returns the first element that is a descendant of node that matches selectors.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
HTMLElementTagNameMap[K] | null
Inherited from
Call Signature
querySelector<K>(selectors): SVGElementTagNameMap[K] | null;
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
SVGElementTagNameMap[K] | null
Inherited from
Call Signature
querySelector<K>(selectors): MathMLElementTagNameMap[K] | null;
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
MathMLElementTagNameMap[K] | null
Inherited from
Call Signature
querySelector<K>(selectors):
| HTMLElementDeprecatedTagNameMap[K]
| null;
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
| HTMLElementDeprecatedTagNameMap[K]
| null
Deprecated
Inherited from
Call Signature
querySelector<E>(selectors): E | null;
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends Element | Element |
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
E | null
Inherited from
querySelectorAll()
Call Signature
querySelectorAll<K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>;
Returns all element descendants of node that match selectors.
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementTagNameMap[K]>
Inherited from
Call Signature
querySelectorAll<K>(selectors): NodeListOf<SVGElementTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof SVGElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<SVGElementTagNameMap[K]>
Inherited from
Call Signature
querySelectorAll<K>(selectors): NodeListOf<MathMLElementTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof MathMLElementTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<MathMLElementTagNameMap[K]>
Inherited from
Call Signature
querySelectorAll<K>(selectors): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters
| Type Parameter |
|---|
K extends keyof HTMLElementDeprecatedTagNameMap |
Parameters
| Parameter | Type |
|---|---|
selectors | K |
Returns
NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
Deprecated
Inherited from
Call Signature
querySelectorAll<E>(selectors): NodeListOf<E>;
Type Parameters
| Type Parameter | Default type |
|---|---|
E extends Element | Element |
Parameters
| Parameter | Type |
|---|---|
selectors | string |
Returns
NodeListOf<E>
Inherited from
releaseEvents()
releaseEvents(): void;
Returns
void
Deprecated
Inherited from
removeChild()
removeChild<T>(child): T;
The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
child | T |
Returns
T
Inherited from
removeEventListener()
Call Signature
removeEventListener<K>(
type,
listener,
options?
): void;
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Type Parameters
| Type Parameter |
|---|
K extends keyof DocumentEventMap |
Parameters
| Parameter | Type |
|---|---|
type | K |
listener | (this, ev) => any |
options? | boolean | EventListenerOptions |
Returns
void
Overrides
Call Signature
removeEventListener(
type,
listener,
options?
): void;
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
Parameters
| Parameter | Type |
|---|---|
type | string |
listener | EventListenerOrEventListenerObject |
options? | boolean | EventListenerOptions |
Returns
void
Overrides
replaceChild()
replaceChild<T>(node, child): T;
The replaceChild() method of the Node interface replaces a child node within the given (parent) node.
Type Parameters
| Type Parameter |
|---|
T extends Node |
Parameters
| Parameter | Type |
|---|---|
node | Node |
child | T |
Returns
T
Inherited from
replaceChildren()
replaceChildren(...nodes): void;
Replace 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.
Parameters
| Parameter | Type |
|---|---|
...nodes | (string | Node)[] |
Returns
void
Inherited from
requestStorageAccess()
requestStorageAccess(): Promise<void>;
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. This is relevant to user agents that, by default, block access to third-party, unpartitioned cookies to improve privacy (e.g., to prevent tracking), and is part of the Storage Access API.
Returns
Promise<void>
Inherited from
startViewTransition()
startViewTransition(callbackOptions?): ViewTransition;
The startViewTransition() method of the Document interface starts a new same-document (SPA) view transition and returns a ViewTransition object to represent it.
Parameters
| Parameter | Type |
|---|---|
callbackOptions? | | ViewTransitionUpdateCallback | StartViewTransitionOptions |
Returns
Inherited from
write()
write(...text): void;
The write() method of the Document interface writes text in one or more TrustedHTML or string parameters to a document stream opened by document.open().
Parameters
| Parameter | Type |
|---|---|
...text | string[] |
Returns
void
Deprecated
Inherited from
writeln()
writeln(...text): void;
The 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.
Parameters
| Parameter | Type |
|---|---|
...text | string[] |
Returns
void
Deprecated
Inherited from
Properties
activeElement
readonly activeElement: Element | null;
Returns 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.
Inherited from
activeViewTransition
readonly activeViewTransition: ViewTransition | null;
The activeViewTransition read-only property of the Document interface returns a ViewTransition instance representing the view transition currently active on the document.
Inherited from
adoptedStyleSheets
adoptedStyleSheets: CSSStyleSheet[];
Inherited from
alinkColor
alinkColor: string;
Returns or sets the color of an active link in the document body. A link is active during the time between mousedown and mouseup events.
Deprecated
Inherited from
all
readonly all: HTMLAllCollection;
The Document interface's read-only all property returns an HTMLAllCollection rooted at the document node.
Deprecated
Inherited from
anchors
readonly anchors: HTMLCollectionOf<HTMLAnchorElement>;
The anchors read-only property of the Document interface returns a list of all of the anchors in the document.
Deprecated
Inherited from
applets
readonly applets: HTMLCollection;
The applets property of the Document returns an empty HTMLCollection. This property is kept only for compatibility reasons; in older versions of browsers, it returned a list of the applets within a document.
Deprecated
Inherited from
ATTRIBUTE_NODE
readonly ATTRIBUTE_NODE: 2;
Inherited from
baseURI
readonly baseURI: string;
The read-only baseURI property of the Node interface returns the absolute base URL of the document containing the node.
Inherited from
bgColor
bgColor: string;
The deprecated bgColor property gets or sets the background color of the current document.
Deprecated
Inherited from
body
body: HTMLElement;
The Document.body property represents the <body> or <frameset> node of the current document, or null if no such element exists.
Inherited from
CDATA_SECTION_NODE
readonly CDATA_SECTION_NODE: 4;
node is a CDATASection node.
Inherited from
characterSet
readonly characterSet: string;
The Document.characterSet read-only property returns the character encoding of the document that it's currently rendered with.
Inherited from
charset
readonly charset: string;
Deprecated
This is a legacy alias of characterSet.
Inherited from
childElementCount
readonly childElementCount: number;
Inherited from
childNodes
readonly childNodes: NodeListOf<ChildNode>;
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.
Inherited from
children
readonly children: HTMLCollection;
Returns the child elements.
Inherited from
COMMENT_NODE
readonly COMMENT_NODE: 8;
node is a Comment node.
Inherited from
compatMode
readonly compatMode: string;
The Document.compatMode read-only property indicates whether the document is rendered in Quirks mode or Standards mode.
Inherited from
contentType
readonly contentType: string;
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.
Inherited from
cookie
cookie: string;
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.
Inherited from
currentScript
readonly currentScript: HTMLOrSVGScriptElement | null;
The Document.currentScript property returns the <script> element whose script is currently being processed and isn't a JavaScript module. (For modules use import.meta instead.)
Inherited from
customElementRegistry
readonly customElementRegistry: CustomElementRegistry | null;
Inherited from
Document.customElementRegistry
defaultView
readonly defaultView: Window & typeof globalThis | null;
In browsers, document.defaultView returns the window object associated with a document, or null if none is available.
Inherited from
designMode
designMode: string;
document.designMode controls whether the entire document is editable. Valid values are "on" and "off". According to the specification, this property is meant to default to "off". Firefox follows this standard. The earlier versions of Chrome and IE default to "inherit". Starting in Chrome 43, the default is "off" and "inherit" is no longer supported. In IE6-10, the value is capitalized.
Inherited from
dir
dir: string;
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. Possible values are 'rtl', right to left, and 'ltr', left to right.
Inherited from
doctype
readonly doctype: DocumentType | null;
The doctype read-only property of the Document interface is a DocumentType object representing the Document Type Declaration (DTD) associated with the current document.
Inherited from
DOCUMENT_FRAGMENT_NODE
readonly DOCUMENT_FRAGMENT_NODE: 11;
node is a DocumentFragment node.
Inherited from
Document.DOCUMENT_FRAGMENT_NODE
DOCUMENT_NODE
readonly DOCUMENT_NODE: 9;
node is a document.
Inherited from
DOCUMENT_POSITION_CONTAINED_BY
readonly DOCUMENT_POSITION_CONTAINED_BY: 16;
Set when other is a descendant of node.
Inherited from
Document.DOCUMENT_POSITION_CONTAINED_BY
DOCUMENT_POSITION_CONTAINS
readonly DOCUMENT_POSITION_CONTAINS: 8;
Set when other is an ancestor of node.
Inherited from
Document.DOCUMENT_POSITION_CONTAINS
DOCUMENT_POSITION_DISCONNECTED
readonly DOCUMENT_POSITION_DISCONNECTED: 1;
Set when node and other are not in the same tree.
Inherited from
Document.DOCUMENT_POSITION_DISCONNECTED
DOCUMENT_POSITION_FOLLOWING
readonly DOCUMENT_POSITION_FOLLOWING: 4;
Set when other is following node.
Inherited from
Document.DOCUMENT_POSITION_FOLLOWING
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
Inherited from
Document.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING
readonly DOCUMENT_POSITION_PRECEDING: 2;
Set when other is preceding node.
Inherited from
Document.DOCUMENT_POSITION_PRECEDING
DOCUMENT_TYPE_NODE
readonly DOCUMENT_TYPE_NODE: 10;
node is a doctype.
Inherited from
documentElement
readonly documentElement: HTMLElement;
The documentElement read-only property of the Document interface returns the Element that is the root element of the document (for example, the <html> element for HTML documents).
Inherited from
documentURI
readonly documentURI: string;
The documentURI read-only property of the Document interface returns the document location as a string.
Inherited from
domain
domain: 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.
Deprecated
Inherited from
ELEMENT_NODE
readonly ELEMENT_NODE: 1;
node is an element.
Inherited from
embeds
readonly embeds: HTMLCollectionOf<HTMLEmbedElement>;
The embeds read-only property of the Document interface returns a list of the embedded <embed> elements within the current document.
Inherited from
ENTITY_NODE
readonly ENTITY_NODE: 6;
Inherited from
ENTITY_REFERENCE_NODE
readonly ENTITY_REFERENCE_NODE: 5;
Inherited from
Document.ENTITY_REFERENCE_NODE
fgColor
fgColor: string;
fgColor gets/sets the foreground color, or text color, of the current document.
Deprecated
Inherited from
firstChild
readonly firstChild: ChildNode | null;
The 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.
Inherited from
firstElementChild
readonly firstElementChild: Element | null;
Returns the first child that is an element, and null otherwise.
Inherited from
fonts
readonly fonts: FontFaceSet;
Inherited from
forms
readonly forms: HTMLCollectionOf<HTMLFormElement>;
The forms read-only property of the Document interface returns an HTMLCollection listing all the <form> elements contained in the document.
Inherited from
fragmentDirective
readonly fragmentDirective: FragmentDirective;
The fragmentDirective read-only property of the Document interface returns the FragmentDirective for the current document.
Inherited from
fullscreen
readonly fullscreen: boolean;
The obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.
Deprecated
Inherited from
fullscreenElement
readonly fullscreenElement: Element | null;
Returns document's fullscreen element.
Inherited from
fullscreenEnabled
readonly fullscreenEnabled: boolean;
The read-only fullscreenEnabled property on the Document interface indicates whether or not fullscreen mode is available.
Inherited from
head
readonly head: HTMLHeadElement;
The head read-only property of the Document interface returns the <head> element of the current document.
Inherited from
hidden
readonly hidden: boolean;
The Document.hidden read-only property returns a Boolean value indicating if the page is considered hidden or not.
Inherited from
images
readonly images: HTMLCollectionOf<HTMLImageElement>;
The images read-only property of the Document interface returns a collection of the images in the current HTML document.
Inherited from
implementation
readonly implementation: DOMImplementation;
The Document.implementation property returns a DOMImplementation object associated with the current document.
Inherited from
inputEncoding
readonly inputEncoding: string;
Deprecated
This is a legacy alias of characterSet.
Inherited from
isConnected
readonly isConnected: boolean;
The read-only isConnected property of the Node interface returns a boolean indicating whether the node is connected (directly or indirectly) to a Document object.
Inherited from
lastChild
readonly lastChild: ChildNode | null;
The read-only lastChild property of the Node interface returns the last child of the node, or null if there are no child nodes.
Inherited from
lastElementChild
readonly lastElementChild: Element | null;
Returns the last child that is an element, and null otherwise.
Inherited from
lastModified
readonly lastModified: string;
The lastModified property of the Document interface returns a string containing the date and local time on which the current document was last modified.
Inherited from
linkColor
linkColor: string;
The Document.linkColor property gets/sets the color of links within the document.
Deprecated
Inherited from
links
readonly links: HTMLCollectionOf<
| HTMLAnchorElement
| HTMLAreaElement>;
The 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.
Inherited from
nextSibling
readonly nextSibling: ChildNode | null;
The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's childNodes, or returns null if the specified node is the last child in the parent element.
Inherited from
nodeName
readonly nodeName: string;
The read-only nodeName property of Node returns the name of the current node as a string.
Inherited from
nodeType
readonly nodeType: number;
The read-only nodeType property of a Node interface is an integer that identifies what the node is. It distinguishes different kinds of nodes from each other, such as elements, text, and comments.
Inherited from
nodeValue
nodeValue: string | null;
The nodeValue property of the Node interface returns or sets the value of the current node.
Inherited from
NOTATION_NODE
readonly NOTATION_NODE: 12;
Inherited from
onabort
onabort: ((this, ev) => any) | null;
Inherited from
onanimationcancel
onanimationcancel: ((this, ev) => any) | null;
Inherited from
onanimationend
onanimationend: ((this, ev) => any) | null;
Inherited from
onanimationiteration
onanimationiteration: ((this, ev) => any) | null;
Inherited from
onanimationstart
onanimationstart: ((this, ev) => any) | null;
Inherited from
onauxclick
onauxclick: ((this, ev) => any) | null;
Inherited from
onbeforeinput
onbeforeinput: ((this, ev) => any) | null;
Inherited from
onbeforematch
onbeforematch: ((this, ev) => any) | null;
Inherited from
onbeforetoggle
onbeforetoggle: ((this, ev) => any) | null;
Inherited from
onblur
onblur: ((this, ev) => any) | null;
Inherited from
oncancel
oncancel: ((this, ev) => any) | null;
Inherited from
oncanplay
oncanplay: ((this, ev) => any) | null;
Inherited from
oncanplaythrough
oncanplaythrough: ((this, ev) => any) | null;
Inherited from
onchange
onchange: ((this, ev) => any) | null;
Inherited from
onclick
onclick: ((this, ev) => any) | null;
Inherited from
onclose
onclose: ((this, ev) => any) | null;
Inherited from
oncommand
oncommand: ((this, ev) => any) | null;
Inherited from
oncontextlost
oncontextlost: ((this, ev) => any) | null;
Inherited from
oncontextmenu
oncontextmenu: ((this, ev) => any) | null;
Inherited from
oncontextrestored
oncontextrestored: ((this, ev) => any) | null;
Inherited from
oncopy
oncopy: ((this, ev) => any) | null;
Inherited from
oncuechange
oncuechange: ((this, ev) => any) | null;
Inherited from
oncut
oncut: ((this, ev) => any) | null;
Inherited from
ondblclick
ondblclick: ((this, ev) => any) | null;
Inherited from
ondrag
ondrag: ((this, ev) => any) | null;
Inherited from
ondragend
ondragend: ((this, ev) => any) | null;
Inherited from
ondragenter
ondragenter: ((this, ev) => any) | null;
Inherited from
ondragleave
ondragleave: ((this, ev) => any) | null;
Inherited from
ondragover
ondragover: ((this, ev) => any) | null;
Inherited from
ondragstart
ondragstart: ((this, ev) => any) | null;
Inherited from
ondrop
ondrop: ((this, ev) => any) | null;
Inherited from
ondurationchange
ondurationchange: ((this, ev) => any) | null;
Inherited from
onemptied
onemptied: ((this, ev) => any) | null;
Inherited from
onended
onended: ((this, ev) => any) | null;
Inherited from
onerror
onerror: OnErrorEventHandler;
Inherited from
onfocus
onfocus: ((this, ev) => any) | null;
Inherited from
onformdata
onformdata: ((this, ev) => any) | null;
Inherited from
onfullscreenchange
onfullscreenchange: ((this, ev) => any) | null;
Inherited from
onfullscreenerror
onfullscreenerror: ((this, ev) => any) | null;
Inherited from
ongotpointercapture
ongotpointercapture: ((this, ev) => any) | null;
Inherited from
oninput
oninput: ((this, ev) => any) | null;
Inherited from
oninvalid
oninvalid: ((this, ev) => any) | null;
Inherited from
onkeydown
onkeydown: ((this, ev) => any) | null;
Inherited from
onkeypress
onkeypress: ((this, ev) => any) | null;
Deprecated
Inherited from
onkeyup
onkeyup: ((this, ev) => any) | null;
Inherited from
onload
onload: ((this, ev) => any) | null;
Inherited from
onloadeddata
onloadeddata: ((this, ev) => any) | null;
Inherited from
onloadedmetadata
onloadedmetadata: ((this, ev) => any) | null;
Inherited from
onloadstart
onloadstart: ((this, ev) => any) | null;
Inherited from
onlostpointercapture
onlostpointercapture: ((this, ev) => any) | null;
Inherited from
onmousedown
onmousedown: ((this, ev) => any) | null;
Inherited from
onmouseenter
onmouseenter: ((this, ev) => any) | null;
Inherited from
onmouseleave
onmouseleave: ((this, ev) => any) | null;
Inherited from
onmousemove
onmousemove: ((this, ev) => any) | null;
Inherited from
onmouseout
onmouseout: ((this, ev) => any) | null;
Inherited from
onmouseover
onmouseover: ((this, ev) => any) | null;
Inherited from
onmouseup
onmouseup: ((this, ev) => any) | null;
Inherited from
onpaste
onpaste: ((this, ev) => any) | null;
Inherited from
onpause
onpause: ((this, ev) => any) | null;
Inherited from
onplay
onplay: ((this, ev) => any) | null;
Inherited from
onplaying
onplaying: ((this, ev) => any) | null;
Inherited from
onpointercancel
onpointercancel: ((this, ev) => any) | null;
Inherited from
onpointerdown
onpointerdown: ((this, ev) => any) | null;
Inherited from
onpointerenter
onpointerenter: ((this, ev) => any) | null;
Inherited from
onpointerleave
onpointerleave: ((this, ev) => any) | null;
Inherited from
onpointerlockchange
onpointerlockchange: ((this, ev) => any) | null;
Inherited from
onpointerlockerror
onpointerlockerror: ((this, ev) => any) | null;
Inherited from
onpointermove
onpointermove: ((this, ev) => any) | null;
Inherited from
onpointerout
onpointerout: ((this, ev) => any) | null;
Inherited from
onpointerover
onpointerover: ((this, ev) => any) | null;
Inherited from
onpointerrawupdate
onpointerrawupdate: ((this, ev) => any) | null;
Available only in secure contexts.
Inherited from
onpointerup
onpointerup: ((this, ev) => any) | null;
Inherited from
onprogress
onprogress: ((this, ev) => any) | null;
Inherited from
onratechange
onratechange: ((this, ev) => any) | null;
Inherited from
onreadystatechange
onreadystatechange: ((this, ev) => any) | null;
Inherited from
onreset
onreset: ((this, ev) => any) | null;
Inherited from
onresize
onresize: ((this, ev) => any) | null;
Inherited from
onscroll
onscroll: ((this, ev) => any) | null;
Inherited from
onscrollend
onscrollend: ((this, ev) => any) | null;
Inherited from
onsecuritypolicyviolation
onsecuritypolicyviolation: ((this, ev) => any) | null;
Inherited from
Document.onsecuritypolicyviolation
onseeked
onseeked: ((this, ev) => any) | null;
Inherited from
onseeking
onseeking: ((this, ev) => any) | null;
Inherited from
onselect
onselect: ((this, ev) => any) | null;
Inherited from
onselectionchange
onselectionchange: ((this, ev) => any) | null;
Inherited from
onselectstart
onselectstart: ((this, ev) => any) | null;
Inherited from
onslotchange
onslotchange: ((this, ev) => any) | null;
Inherited from
onstalled
onstalled: ((this, ev) => any) | null;
Inherited from
onsubmit
onsubmit: ((this, ev) => any) | null;
Inherited from
onsuspend
onsuspend: ((this, ev) => any) | null;
Inherited from
ontimeupdate
ontimeupdate: ((this, ev) => any) | null;
Inherited from
ontoggle
ontoggle: ((this, ev) => any) | null;
Inherited from
ontouchcancel?
optional ontouchcancel?: ((this, ev) => any) | null;
Inherited from
ontouchend?
optional ontouchend?: ((this, ev) => any) | null;
Inherited from
ontouchmove?
optional ontouchmove?: ((this, ev) => any) | null;
Inherited from
ontouchstart?
optional ontouchstart?: ((this, ev) => any) | null;
Inherited from
ontransitioncancel
ontransitioncancel: ((this, ev) => any) | null;
Inherited from
ontransitionend
ontransitionend: ((this, ev) => any) | null;
Inherited from
ontransitionrun
ontransitionrun: ((this, ev) => any) | null;
Inherited from
ontransitionstart
ontransitionstart: ((this, ev) => any) | null;
Inherited from
onvisibilitychange
onvisibilitychange: ((this, ev) => any) | null;
Inherited from
onvolumechange
onvolumechange: ((this, ev) => any) | null;
Inherited from
onwaiting
onwaiting: ((this, ev) => any) | null;
Inherited from
onwebkitanimationend
onwebkitanimationend: ((this, ev) => any) | null;
Deprecated
This is a legacy alias of onanimationend.
Inherited from
onwebkitanimationiteration
onwebkitanimationiteration: ((this, ev) => any) | null;
Deprecated
This is a legacy alias of onanimationiteration.
Inherited from
Document.onwebkitanimationiteration
onwebkitanimationstart
onwebkitanimationstart: ((this, ev) => any) | null;
Deprecated
This is a legacy alias of onanimationstart.
Inherited from
Document.onwebkitanimationstart
onwebkittransitionend
onwebkittransitionend: ((this, ev) => any) | null;
Deprecated
This is a legacy alias of ontransitionend.
Inherited from
Document.onwebkittransitionend
onwheel
onwheel: ((this, ev) => any) | null;
Inherited from
ownerDocument
readonly ownerDocument: null;
The read-only ownerDocument property of the Node interface returns the top-level document object of the node.
Inherited from
parentElement
readonly parentElement: HTMLElement | null;
The 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. Node.parentNode on the other hand returns any kind of parent, regardless of its type.
Inherited from
parentNode
readonly parentNode: ParentNode | null;
The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.
Inherited from
pictureInPictureElement
readonly pictureInPictureElement: Element | null;
Inherited from
Document.pictureInPictureElement
pictureInPictureEnabled
readonly pictureInPictureEnabled: boolean;
The read-only pictureInPictureEnabled property of the Document interface indicates whether or not picture-in-picture mode is available.
Inherited from
Document.pictureInPictureEnabled
plugins
readonly plugins: HTMLCollectionOf<HTMLEmbedElement>;
The plugins read-only property of the Document interface returns an HTMLCollection object containing one or more HTMLEmbedElements representing the <embed> elements in the current document.
Inherited from
pointerLockElement
readonly pointerLockElement: Element | null;
Inherited from
previousSibling
readonly previousSibling: ChildNode | null;
The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's childNodes list, or null if the specified node is the first in that list.
Inherited from
PROCESSING_INSTRUCTION_NODE
readonly PROCESSING_INSTRUCTION_NODE: 7;
node is a ProcessingInstruction node.
Inherited from
Document.PROCESSING_INSTRUCTION_NODE
readyState
readonly readyState: DocumentReadyState;
The Document.readyState property describes the loading state of the document. When the value of this property changes, a readystatechange event fires on the document object.
Inherited from
referrer
readonly referrer: string;
The Document.referrer property returns the URI of the page that linked to this page.
Inherited from
rootElement
readonly rootElement: SVGSVGElement | null;
Document.rootElement returns the Element that is the root element of the document if it is an <svg> element, otherwise null. It is deprecated in favor of Document.documentElement, which returns the root element for all documents.
Deprecated
Inherited from
scripts
readonly scripts: HTMLCollectionOf<HTMLScriptElement>;
The scripts property of the Document interface returns a list of the <script> elements in the document. The returned object is an HTMLCollection.
Inherited from
scrollingElement
readonly scrollingElement: Element | null;
The scrollingElement read-only property of the Document interface returns a reference to the Element that scrolls the document. In standards mode, this is the root element of the document, document.documentElement.
Inherited from
styleSheets
readonly styleSheets: StyleSheetList;
Inherited from
TEXT_NODE
readonly TEXT_NODE: 3;
node is a Text node.
Inherited from
timeline
readonly timeline: DocumentTimeline;
The timeline readonly property of the Document interface represents the default timeline of the current document. This timeline is a special instance of DocumentTimeline.
Inherited from
title
title: string;
The document.title property gets or sets the current title of the document. When present, it defaults to the value of the <title>.
Inherited from
URL
readonly URL: string;
The URL read-only property of the Document interface returns the document location as a string.
Inherited from
visibilityState
readonly visibilityState: DocumentVisibilityState;
The Document.visibilityState read-only property returns the visibility of the document. It can be used to check whether the document is in the background or in a minimized window, or is otherwise not visible to the user.
Inherited from
vlinkColor
vlinkColor: string;
The Document.vlinkColor property gets/sets the color of links that the user has visited in the document.