Skip to main content

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.

MDN Reference

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.

MDN Reference

Returns​

Location

Set Signature​

set location(href): void;
Parameters​
ParameterType
hrefstring
Returns​

void

Inherited from​

Document.location


textContent​

Get Signature​

get textContent(): null;

MDN Reference

Returns​

null

The textContent property of the Node interface represents the text content of the node and its descendants.

MDN Reference

Inherited from​

Document.textContent

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.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof DocumentEventMap
Parameters​
ParameterType
typeK
listener(this, ev) => any
options?boolean | AddEventListenerOptions
Returns​

void

Overrides​

Document.addEventListener

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.

MDN Reference

Parameters​
ParameterType
typestring
listenerEventListenerOrEventListenerObject
options?boolean | AddEventListenerOptions
Returns​

void

Overrides​

Document.addEventListener


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.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
nodeT

Returns​

T

Inherited from​

Document.adoptNode


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.

MDN Reference

Parameters​

ParameterType
...nodes(string | Node)[]

Returns​

void

Inherited from​

Document.append


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.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
nodeT

Returns​

T

Inherited from​

Document.appendChild


captureEvents()​

captureEvents(): void;

Returns​

void

Deprecated​

Inherited from​

Document.captureEvents


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.

MDN Reference

Parameters​

ParameterType
xnumber
ynumber
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​

ParameterType
xnumber
ynumber

Returns​

Range | null

Deprecated​

Inherited from​

Document.caretRangeFromPoint


clear()​

clear(): void;

The Document.clear() method does nothing, but doesn't raise any error.

Returns​

void

Deprecated​

MDN Reference

Inherited from​

Document.clear


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.

MDN Reference

Parameters​

ParameterType
subtree?boolean

Returns​

Node

Inherited from​

Document.cloneNode


close()​

close(): void;

The Document.close() method finishes writing to a document, opened with Document.open().

MDN Reference

Returns​

void

Inherited from​

Document.close


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.

MDN Reference

Parameters​

ParameterType
otherNode

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.

MDN Reference

Parameters​

ParameterType
otherNode | null

Returns​

boolean

Inherited from​

Document.contains


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.

MDN Reference

Parameters​

ParameterType
localNamestring

Returns​

Attr

Inherited from​

Document.createAttribute


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.

MDN Reference

Parameters​

ParameterType
namespacestring | null
qualifiedNamestring

Returns​

Attr

Inherited from​

Document.createAttributeNS


createCDATASection()​

createCDATASection(data): CDATASection;

createCDATASection() creates a new CDATA section node, and returns it.

MDN Reference

Parameters​

ParameterType
datastring

Returns​

CDATASection

Inherited from​

Document.createCDATASection


createComment()​

createComment(data): Comment;

createComment() creates a new comment node, and returns it.

MDN Reference

Parameters​

ParameterType
datastring

Returns​

Comment

Inherited from​

Document.createComment


createDocumentFragment()​

createDocumentFragment(): DocumentFragment;

Creates a new empty DocumentFragment into which DOM nodes can be added to build an offscreen DOM tree.

MDN Reference

Returns​

DocumentFragment

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.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters​
ParameterType
tagNameK
options?ElementCreationOptions
Returns​

HTMLElementTagNameMap[K]

Inherited from​

Document.createElement

Call Signature​

createElement<K>(tagName, options?): HTMLElementDeprecatedTagNameMap[K];
Type Parameters​
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters​
ParameterType
tagNameK
options?ElementCreationOptions
Returns​

HTMLElementDeprecatedTagNameMap[K]

Deprecated​
Inherited from​

Document.createElement

Call Signature​

createElement(tagName, options?): HTMLElement;
Parameters​
ParameterType
tagNamestring
options?ElementCreationOptions
Returns​

HTMLElement

Inherited from​

Document.createElement


createElementNS()​

Call Signature​

createElementNS(namespaceURI, qualifiedName): HTMLElement;

Creates an element with the specified namespace URI and qualified name.

MDN Reference

Parameters​
ParameterType
namespaceURI"http://www.w3.org/1999/xhtml"
qualifiedNamestring
Returns​

HTMLElement

Inherited from​

Document.createElementNS

Call Signature​

createElementNS<K>(namespaceURI, qualifiedName): SVGElementTagNameMap[K];
Type Parameters​
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters​
ParameterType
namespaceURI"http://www.w3.org/2000/svg"
qualifiedNameK
Returns​

SVGElementTagNameMap[K]

Inherited from​

Document.createElementNS

Call Signature​

createElementNS(namespaceURI, qualifiedName): SVGElement;
Parameters​
ParameterType
namespaceURI"http://www.w3.org/2000/svg"
qualifiedNamestring
Returns​

SVGElement

Inherited from​

Document.createElementNS

Call Signature​

createElementNS<K>(namespaceURI, qualifiedName): MathMLElementTagNameMap[K];
Type Parameters​
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters​
ParameterType
namespaceURI"http://www.w3.org/1998/Math/MathML"
qualifiedNameK
Returns​

MathMLElementTagNameMap[K]

Inherited from​

Document.createElementNS

Call Signature​

createElementNS(namespaceURI, qualifiedName): MathMLElement;
Parameters​
ParameterType
namespaceURI"http://www.w3.org/1998/Math/MathML"
qualifiedNamestring
Returns​

MathMLElement

Inherited from​

Document.createElementNS

Call Signature​

createElementNS(
namespaceURI,
qualifiedName,
options?
): Element;
Parameters​
ParameterType
namespaceURIstring | null
qualifiedNamestring
options?ElementCreationOptions
Returns​

Element

Inherited from​

Document.createElementNS

Call Signature​

createElementNS(
namespace,
qualifiedName,
options?
): Element;
Parameters​
ParameterType
namespacestring | null
qualifiedNamestring
options?string | ElementCreationOptions
Returns​

Element

Inherited from​

Document.createElementNS


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​
ParameterType
eventInterface"AnimationEvent"
Returns​

AnimationEvent

Deprecated​

MDN Reference

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): AnimationPlaybackEvent;
Parameters​
ParameterType
eventInterface"AnimationPlaybackEvent"
Returns​

AnimationPlaybackEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): AudioProcessingEvent;
Parameters​
ParameterType
eventInterface"AudioProcessingEvent"
Returns​

AudioProcessingEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): BeforeUnloadEvent;
Parameters​
ParameterType
eventInterface"BeforeUnloadEvent"
Returns​

BeforeUnloadEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): BlobEvent;
Parameters​
ParameterType
eventInterface"BlobEvent"
Returns​

BlobEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): ClipboardEvent;
Parameters​
ParameterType
eventInterface"ClipboardEvent"
Returns​

ClipboardEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): CloseEvent;
Parameters​
ParameterType
eventInterface"CloseEvent"
Returns​

CloseEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): CommandEvent;
Parameters​
ParameterType
eventInterface"CommandEvent"
Returns​

CommandEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): CompositionEvent;
Parameters​
ParameterType
eventInterface"CompositionEvent"
Returns​

CompositionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): ContentVisibilityAutoStateChangeEvent;
Parameters​
ParameterType
eventInterface"ContentVisibilityAutoStateChangeEvent"
Returns​

ContentVisibilityAutoStateChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): CookieChangeEvent;
Parameters​
ParameterType
eventInterface"CookieChangeEvent"
Returns​

CookieChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): CustomEvent;
Parameters​
ParameterType
eventInterface"CustomEvent"
Returns​

CustomEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): DeviceMotionEvent;
Parameters​
ParameterType
eventInterface"DeviceMotionEvent"
Returns​

DeviceMotionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): DeviceOrientationEvent;
Parameters​
ParameterType
eventInterface"DeviceOrientationEvent"
Returns​

DeviceOrientationEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): DragEvent;
Parameters​
ParameterType
eventInterface"DragEvent"
Returns​

DragEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): ErrorEvent;
Parameters​
ParameterType
eventInterface"ErrorEvent"
Returns​

ErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): Event;
Parameters​
ParameterType
eventInterface"Event"
Returns​

Event

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): Event;
Parameters​
ParameterType
eventInterface"Events"
Returns​

Event

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): FocusEvent;
Parameters​
ParameterType
eventInterface"FocusEvent"
Returns​

FocusEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): FontFaceSetLoadEvent;
Parameters​
ParameterType
eventInterface"FontFaceSetLoadEvent"
Returns​

FontFaceSetLoadEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): FormDataEvent;
Parameters​
ParameterType
eventInterface"FormDataEvent"
Returns​

FormDataEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): GPUUncapturedErrorEvent;
Parameters​
ParameterType
eventInterface"GPUUncapturedErrorEvent"
Returns​

GPUUncapturedErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): GamepadEvent;
Parameters​
ParameterType
eventInterface"GamepadEvent"
Returns​

GamepadEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): HashChangeEvent;
Parameters​
ParameterType
eventInterface"HashChangeEvent"
Returns​

HashChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): IDBVersionChangeEvent;
Parameters​
ParameterType
eventInterface"IDBVersionChangeEvent"
Returns​

IDBVersionChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): InputEvent;
Parameters​
ParameterType
eventInterface"InputEvent"
Returns​

InputEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): KeyboardEvent;
Parameters​
ParameterType
eventInterface"KeyboardEvent"
Returns​

KeyboardEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MIDIConnectionEvent;
Parameters​
ParameterType
eventInterface"MIDIConnectionEvent"
Returns​

MIDIConnectionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MIDIMessageEvent;
Parameters​
ParameterType
eventInterface"MIDIMessageEvent"
Returns​

MIDIMessageEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MediaEncryptedEvent;
Parameters​
ParameterType
eventInterface"MediaEncryptedEvent"
Returns​

MediaEncryptedEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MediaKeyMessageEvent;
Parameters​
ParameterType
eventInterface"MediaKeyMessageEvent"
Returns​

MediaKeyMessageEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MediaQueryListEvent;
Parameters​
ParameterType
eventInterface"MediaQueryListEvent"
Returns​

MediaQueryListEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MediaStreamTrackEvent;
Parameters​
ParameterType
eventInterface"MediaStreamTrackEvent"
Returns​

MediaStreamTrackEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MessageEvent;
Parameters​
ParameterType
eventInterface"MessageEvent"
Returns​

MessageEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MouseEvent;
Parameters​
ParameterType
eventInterface"MouseEvent"
Returns​

MouseEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): MouseEvent;
Parameters​
ParameterType
eventInterface"MouseEvents"
Returns​

MouseEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): NavigateEvent;
Parameters​
ParameterType
eventInterface"NavigateEvent"
Returns​

NavigateEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): NavigationCurrentEntryChangeEvent;
Parameters​
ParameterType
eventInterface"NavigationCurrentEntryChangeEvent"
Returns​

NavigationCurrentEntryChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): OfflineAudioCompletionEvent;
Parameters​
ParameterType
eventInterface"OfflineAudioCompletionEvent"
Returns​

OfflineAudioCompletionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PageRevealEvent;
Parameters​
ParameterType
eventInterface"PageRevealEvent"
Returns​

PageRevealEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PageSwapEvent;
Parameters​
ParameterType
eventInterface"PageSwapEvent"
Returns​

PageSwapEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PageTransitionEvent;
Parameters​
ParameterType
eventInterface"PageTransitionEvent"
Returns​

PageTransitionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PaymentMethodChangeEvent;
Parameters​
ParameterType
eventInterface"PaymentMethodChangeEvent"
Returns​

PaymentMethodChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PaymentRequestUpdateEvent;
Parameters​
ParameterType
eventInterface"PaymentRequestUpdateEvent"
Returns​

PaymentRequestUpdateEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PictureInPictureEvent;
Parameters​
ParameterType
eventInterface"PictureInPictureEvent"
Returns​

PictureInPictureEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PointerEvent;
Parameters​
ParameterType
eventInterface"PointerEvent"
Returns​

PointerEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PopStateEvent;
Parameters​
ParameterType
eventInterface"PopStateEvent"
Returns​

PopStateEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): ProgressEvent;
Parameters​
ParameterType
eventInterface"ProgressEvent"
Returns​

ProgressEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): PromiseRejectionEvent;
Parameters​
ParameterType
eventInterface"PromiseRejectionEvent"
Returns​

PromiseRejectionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCDTMFToneChangeEvent;
Parameters​
ParameterType
eventInterface"RTCDTMFToneChangeEvent"
Returns​

RTCDTMFToneChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCDataChannelEvent;
Parameters​
ParameterType
eventInterface"RTCDataChannelEvent"
Returns​

RTCDataChannelEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCErrorEvent;
Parameters​
ParameterType
eventInterface"RTCErrorEvent"
Returns​

RTCErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCPeerConnectionIceErrorEvent;
Parameters​
ParameterType
eventInterface"RTCPeerConnectionIceErrorEvent"
Returns​

RTCPeerConnectionIceErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCPeerConnectionIceEvent;
Parameters​
ParameterType
eventInterface"RTCPeerConnectionIceEvent"
Returns​

RTCPeerConnectionIceEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): RTCTrackEvent;
Parameters​
ParameterType
eventInterface"RTCTrackEvent"
Returns​

RTCTrackEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SecurityPolicyViolationEvent;
Parameters​
ParameterType
eventInterface"SecurityPolicyViolationEvent"
Returns​

SecurityPolicyViolationEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SpeechRecognitionErrorEvent;
Parameters​
ParameterType
eventInterface"SpeechRecognitionErrorEvent"
Returns​

SpeechRecognitionErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SpeechRecognitionEvent;
Parameters​
ParameterType
eventInterface"SpeechRecognitionEvent"
Returns​

SpeechRecognitionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SpeechSynthesisErrorEvent;
Parameters​
ParameterType
eventInterface"SpeechSynthesisErrorEvent"
Returns​

SpeechSynthesisErrorEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SpeechSynthesisEvent;
Parameters​
ParameterType
eventInterface"SpeechSynthesisEvent"
Returns​

SpeechSynthesisEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): StorageEvent;
Parameters​
ParameterType
eventInterface"StorageEvent"
Returns​

StorageEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): SubmitEvent;
Parameters​
ParameterType
eventInterface"SubmitEvent"
Returns​

SubmitEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): TaskPriorityChangeEvent;
Parameters​
ParameterType
eventInterface"TaskPriorityChangeEvent"
Returns​

TaskPriorityChangeEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): TextEvent;
Parameters​
ParameterType
eventInterface"TextEvent"
Returns​

TextEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): ToggleEvent;
Parameters​
ParameterType
eventInterface"ToggleEvent"
Returns​

ToggleEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): TouchEvent;
Parameters​
ParameterType
eventInterface"TouchEvent"
Returns​

TouchEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): TrackEvent;
Parameters​
ParameterType
eventInterface"TrackEvent"
Returns​

TrackEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): TransitionEvent;
Parameters​
ParameterType
eventInterface"TransitionEvent"
Returns​

TransitionEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): UIEvent;
Parameters​
ParameterType
eventInterface"UIEvent"
Returns​

UIEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): UIEvent;
Parameters​
ParameterType
eventInterface"UIEvents"
Returns​

UIEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): WebGLContextEvent;
Parameters​
ParameterType
eventInterface"WebGLContextEvent"
Returns​

WebGLContextEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): WheelEvent;
Parameters​
ParameterType
eventInterface"WheelEvent"
Returns​

WheelEvent

Inherited from​

Document.createEvent

Call Signature​

createEvent(eventInterface): Event;
Parameters​
ParameterType
eventInterfacestring
Returns​

Event

Inherited from​

Document.createEvent


createExpression()​

createExpression(expression, resolver?): XPathExpression;

MDN Reference

Parameters​

ParameterType
expressionstring
resolver?XPathNSResolver | null

Returns​

XPathExpression

Inherited from​

Document.createExpression


createNodeIterator()​

createNodeIterator(
root,
whatToShow?,
filter?
): NodeIterator;

The Document.createNodeIterator() method returns a new NodeIterator object.

MDN Reference

Parameters​

ParameterType
rootNode
whatToShow?number
filter?NodeFilter | null

Returns​

NodeIterator

Inherited from​

Document.createNodeIterator


createNSResolver()​

createNSResolver(nodeResolver): Node;

Parameters​

ParameterType
nodeResolverNode

Returns​

Node

Deprecated​

MDN Reference

Inherited from​

Document.createNSResolver


createProcessingInstruction()​

createProcessingInstruction(target, data): ProcessingInstruction;

createProcessingInstruction() generates a new processing instruction node and returns it.

MDN Reference

Parameters​

ParameterType
targetstring
datastring

Returns​

ProcessingInstruction

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.

MDN Reference

Returns​

Range

Inherited from​

Document.createRange


createTextNode()​

createTextNode(data): Text;

Creates a new Text node. This method can be used to escape HTML characters.

MDN Reference

Parameters​

ParameterType
datastring

Returns​

Text

Inherited from​

Document.createTextNode


createTreeWalker()​

createTreeWalker(
root,
whatToShow?,
filter?
): TreeWalker;

The Document.createTreeWalker() creator method returns a newly created TreeWalker object.

MDN Reference

Parameters​

ParameterType
rootNode
whatToShow?number
filter?NodeFilter | null

Returns​

TreeWalker

Inherited from​

Document.createTreeWalker


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().

MDN Reference

Parameters​

ParameterType
eventEvent

Returns​

boolean

Inherited from​

Document.dispatchEvent


elementFromPoint()​

elementFromPoint(x, y): Element | null;

Parameters​

ParameterType
xnumber
ynumber

Returns​

Element | null

Inherited from​

Document.elementFromPoint


elementsFromPoint()​

elementsFromPoint(x, y): Element[];

Parameters​

ParameterType
xnumber
ynumber

Returns​

Element[]

Inherited from​

Document.elementsFromPoint


evaluate()​

evaluate(
expression,
contextNode,
resolver?,
type?,
result?
): XPathResult;

MDN Reference

Parameters​

ParameterType
expressionstring
contextNodeNode
resolver?XPathNSResolver | null
type?number
result?XPathResult | null

Returns​

XPathResult

Inherited from​

Document.evaluate


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​

ParameterType
commandIdstring
showUI?boolean
value?string

Returns​

boolean

Deprecated​

MDN Reference

Inherited from​

Document.execCommand


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().

MDN Reference

Returns​

Promise<void>

Inherited from​

Document.exitFullscreen


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().

MDN Reference

Returns​

Promise<void>

Inherited from​

Document.exitPictureInPicture


exitPointerLock()​

exitPointerLock(): void;

The exitPointerLock() method of the Document interface asynchronously releases a pointer lock previously requested through Element.requestPointerLock.

MDN Reference

Returns​

void

Inherited from​

Document.exitPointerLock


getAnimations()​

getAnimations(): Animation[];

MDN Reference

Returns​

Animation[]

Inherited from​

Document.getAnimations


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​

ParameterType
elementIdstring

Returns​

HTMLElement | null

Inherited from​

Document.getElementById


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).

MDN Reference

Parameters​

ParameterType
classNamesstring

Returns​

HTMLCollectionOf<Element>

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.

MDN Reference

Parameters​

ParameterType
elementNamestring

Returns​

NodeListOf<HTMLElement>

Inherited from​

Document.getElementsByName


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.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters​
ParameterType
qualifiedNameK
Returns​

HTMLCollectionOf<HTMLElementTagNameMap[K]>

Inherited from​

Document.getElementsByTagName

Call Signature​

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<SVGElementTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters​
ParameterType
qualifiedNameK
Returns​

HTMLCollectionOf<SVGElementTagNameMap[K]>

Inherited from​

Document.getElementsByTagName

Call Signature​

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters​
ParameterType
qualifiedNameK
Returns​

HTMLCollectionOf<MathMLElementTagNameMap[K]>

Inherited from​

Document.getElementsByTagName

Call Signature​

getElementsByTagName<K>(qualifiedName): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters​
ParameterType
qualifiedNameK
Returns​

HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

Deprecated​
Inherited from​

Document.getElementsByTagName

Call Signature​

getElementsByTagName(qualifiedName): HTMLCollectionOf<Element>;
Parameters​
ParameterType
qualifiedNamestring
Returns​

HTMLCollectionOf<Element>

Inherited from​

Document.getElementsByTagName


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.

MDN Reference

Parameters​
ParameterType
namespaceURI"http://www.w3.org/1999/xhtml"
localNamestring
Returns​

HTMLCollectionOf<HTMLElement>

Inherited from​

Document.getElementsByTagNameNS

Call Signature​

getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<SVGElement>;
Parameters​
ParameterType
namespaceURI"http://www.w3.org/2000/svg"
localNamestring
Returns​

HTMLCollectionOf<SVGElement>

Inherited from​

Document.getElementsByTagNameNS

Call Signature​

getElementsByTagNameNS(namespaceURI, localName): HTMLCollectionOf<MathMLElement>;
Parameters​
ParameterType
namespaceURI"http://www.w3.org/1998/Math/MathML"
localNamestring
Returns​

HTMLCollectionOf<MathMLElement>

Inherited from​

Document.getElementsByTagNameNS

Call Signature​

getElementsByTagNameNS(namespace, localName): HTMLCollectionOf<Element>;
Parameters​
ParameterType
namespacestring | null
localNamestring
Returns​

HTMLCollectionOf<Element>

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.

MDN Reference

Parameters​

ParameterType
options?GetRootNodeOptions

Returns​

Node

Inherited from​

Document.getRootNode


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.

MDN Reference

Returns​

Selection | null

Inherited from​

Document.getSelection


hasChildNodes()​

hasChildNodes(): boolean;

The hasChildNodes() method of the Node interface returns a boolean value indicating whether the given Node has child nodes or not.

MDN Reference

Returns​

boolean

Inherited from​

Document.hasChildNodes


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.

MDN Reference

Returns​

boolean

Inherited from​

Document.hasFocus


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.

MDN Reference

Returns​

Promise<boolean>

Inherited from​

Document.hasStorageAccess


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.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
nodeT
options?boolean | ImportNodeOptions

Returns​

T

Inherited from​

Document.importNode


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.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
nodeT
childNode | null

Returns​

T

Inherited from​

Document.insertBefore


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.

MDN Reference

Parameters​

ParameterType
namespacestring | null

Returns​

boolean

Inherited from​

Document.isDefaultNamespace


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.

MDN Reference

Parameters​

ParameterType
otherNodeNode | null

Returns​

boolean

Inherited from​

Document.isEqualNode


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).

MDN Reference

Parameters​

ParameterType
otherNodeNode | null

Returns​

boolean

Inherited from​

Document.isSameNode


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().

MDN Reference

Parameters​

ParameterType
prefixstring | null

Returns​

string | null

Inherited from​

Document.lookupNamespaceURI


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.

MDN Reference

Parameters​

ParameterType
namespacestring | null

Returns​

string | null

Inherited from​

Document.lookupPrefix


moveBefore()​

moveBefore(node, child): void;

MDN Reference

Parameters​

ParameterType
nodeNode
childNode | null

Returns​

void

Inherited from​

Document.moveBefore


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.

MDN Reference

Returns​

void

Inherited from​

Document.normalize


open()​

Call Signature​

open(unused1?, unused2?): Document;

The Document.open() method opens a document for writing.

MDN Reference

Parameters​
ParameterType
unused1?string
unused2?string
Returns​

Document

Inherited from​

Document.open

Call Signature​

open(
url,
name,
features
): Window | null;
Parameters​
ParameterType
urlstring | URL
namestring
featuresstring
Returns​

Window | null

Inherited from​

Document.open


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.

MDN Reference

Parameters​

ParameterType
...nodes(string | Node)[]

Returns​

void

Inherited from​

Document.prepend


queryCommandEnabled()​

queryCommandEnabled(commandId): boolean;

The Document.queryCommandEnabled() method reports whether or not the specified editor command is enabled by the browser.

Parameters​

ParameterType
commandIdstring

Returns​

boolean

Deprecated​

MDN Reference

Inherited from​

Document.queryCommandEnabled


queryCommandIndeterm()​

queryCommandIndeterm(commandId): boolean;

Parameters​

ParameterType
commandIdstring

Returns​

boolean

Deprecated​

Inherited from​

Document.queryCommandIndeterm


queryCommandState()​

queryCommandState(commandId): boolean;

The queryCommandState() method will tell you if the current selection has a certain Document.execCommand() command applied.

Parameters​

ParameterType
commandIdstring

Returns​

boolean

Deprecated​

MDN Reference

Inherited from​

Document.queryCommandState


queryCommandSupported()​

queryCommandSupported(commandId): boolean;

The Document.queryCommandSupported() method reports whether or not the specified editor command is supported by the browser.

Parameters​

ParameterType
commandIdstring

Returns​

boolean

Deprecated​

MDN Reference

Inherited from​

Document.queryCommandSupported


queryCommandValue()​

queryCommandValue(commandId): string;

Parameters​

ParameterType
commandIdstring

Returns​

string

Deprecated​

Inherited from​

Document.queryCommandValue


querySelector()​

Call Signature​

querySelector<K>(selectors): HTMLElementTagNameMap[K] | null;

Returns the first element that is a descendant of node that matches selectors.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

HTMLElementTagNameMap[K] | null

Inherited from​

Document.querySelector

Call Signature​

querySelector<K>(selectors): SVGElementTagNameMap[K] | null;
Type Parameters​
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

SVGElementTagNameMap[K] | null

Inherited from​

Document.querySelector

Call Signature​

querySelector<K>(selectors): MathMLElementTagNameMap[K] | null;
Type Parameters​
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

MathMLElementTagNameMap[K] | null

Inherited from​

Document.querySelector

Call Signature​

querySelector<K>(selectors):
| HTMLElementDeprecatedTagNameMap[K]
| null;
Type Parameters​
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

| HTMLElementDeprecatedTagNameMap[K] | null

Deprecated​
Inherited from​

Document.querySelector

Call Signature​

querySelector<E>(selectors): E | null;
Type Parameters​
Type ParameterDefault type
E extends ElementElement
Parameters​
ParameterType
selectorsstring
Returns​

E | null

Inherited from​

Document.querySelector


querySelectorAll()​

Call Signature​

querySelectorAll<K>(selectors): NodeListOf<HTMLElementTagNameMap[K]>;

Returns all element descendants of node that match selectors.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof HTMLElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

NodeListOf<HTMLElementTagNameMap[K]>

Inherited from​

Document.querySelectorAll

Call Signature​

querySelectorAll<K>(selectors): NodeListOf<SVGElementTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof SVGElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

NodeListOf<SVGElementTagNameMap[K]>

Inherited from​

Document.querySelectorAll

Call Signature​

querySelectorAll<K>(selectors): NodeListOf<MathMLElementTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof MathMLElementTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

NodeListOf<MathMLElementTagNameMap[K]>

Inherited from​

Document.querySelectorAll

Call Signature​

querySelectorAll<K>(selectors): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
Type Parameters​
Type Parameter
K extends keyof HTMLElementDeprecatedTagNameMap
Parameters​
ParameterType
selectorsK
Returns​

NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Deprecated​
Inherited from​

Document.querySelectorAll

Call Signature​

querySelectorAll<E>(selectors): NodeListOf<E>;
Type Parameters​
Type ParameterDefault type
E extends ElementElement
Parameters​
ParameterType
selectorsstring
Returns​

NodeListOf<E>

Inherited from​

Document.querySelectorAll


releaseEvents()​

releaseEvents(): void;

Returns​

void

Deprecated​

Inherited from​

Document.releaseEvents


removeChild()​

removeChild<T>(child): T;

The removeChild() method of the Node interface removes a child node from the DOM and returns the removed node.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
childT

Returns​

T

Inherited from​

Document.removeChild


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.

MDN Reference

Type Parameters​
Type Parameter
K extends keyof DocumentEventMap
Parameters​
ParameterType
typeK
listener(this, ev) => any
options?boolean | EventListenerOptions
Returns​

void

Overrides​

Document.removeEventListener

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.

MDN Reference

Parameters​
ParameterType
typestring
listenerEventListenerOrEventListenerObject
options?boolean | EventListenerOptions
Returns​

void

Overrides​

Document.removeEventListener


replaceChild()​

replaceChild<T>(node, child): T;

The replaceChild() method of the Node interface replaces a child node within the given (parent) node.

MDN Reference

Type Parameters​

Type Parameter
T extends Node

Parameters​

ParameterType
nodeNode
childT

Returns​

T

Inherited from​

Document.replaceChild


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.

MDN Reference

Parameters​

ParameterType
...nodes(string | Node)[]

Returns​

void

Inherited from​

Document.replaceChildren


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.

MDN Reference

Returns​

Promise<void>

Inherited from​

Document.requestStorageAccess


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.

MDN Reference

Parameters​

ParameterType
callbackOptions?| ViewTransitionUpdateCallback | StartViewTransitionOptions

Returns​

ViewTransition

Inherited from​

Document.startViewTransition


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​

ParameterType
...textstring[]

Returns​

void

Deprecated​

MDN Reference

Inherited from​

Document.write


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​

ParameterType
...textstring[]

Returns​

void

Deprecated​

MDN Reference

Inherited from​

Document.writeln

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.

MDN Reference

Inherited from​

Document.activeElement


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.

MDN Reference

Inherited from​

Document.activeViewTransition


adoptedStyleSheets​

adoptedStyleSheets: CSSStyleSheet[];

MDN Reference

Inherited from​

Document.adoptedStyleSheets


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​

MDN Reference

Inherited from​

Document.alinkColor


all​

readonly all: HTMLAllCollection;

The Document interface's read-only all property returns an HTMLAllCollection rooted at the document node.

Deprecated​

MDN Reference

Inherited from​

Document.all


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​

MDN Reference

Inherited from​

Document.anchors


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​

MDN Reference

Inherited from​

Document.applets


ATTRIBUTE_NODE​

readonly ATTRIBUTE_NODE: 2;

Inherited from​

Document.ATTRIBUTE_NODE


baseURI​

readonly baseURI: string;

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

MDN Reference

Inherited from​

Document.baseURI


bgColor​

bgColor: string;

The deprecated bgColor property gets or sets the background color of the current document.

Deprecated​

MDN Reference

Inherited from​

Document.bgColor


body​

body: HTMLElement;

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

MDN Reference

Inherited from​

Document.body


CDATA_SECTION_NODE​

readonly CDATA_SECTION_NODE: 4;

node is a CDATASection node.

Inherited from​

Document.CDATA_SECTION_NODE


characterSet​

readonly characterSet: string;

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

MDN Reference

Inherited from​

Document.characterSet


charset​

readonly charset: string;

Deprecated​

This is a legacy alias of characterSet.

MDN Reference

Inherited from​

Document.charset


childElementCount​

readonly childElementCount: number;

MDN Reference

Inherited from​

Document.childElementCount


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.

MDN Reference

Inherited from​

Document.childNodes


children​

readonly children: HTMLCollection;

Returns the child elements.

MDN Reference

Inherited from​

Document.children


COMMENT_NODE​

readonly COMMENT_NODE: 8;

node is a Comment node.

Inherited from​

Document.COMMENT_NODE


compatMode​

readonly compatMode: string;

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

MDN Reference

Inherited from​

Document.compatMode


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.

MDN Reference

Inherited from​

Document.contentType


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.

MDN Reference

Inherited from​

Document.cookie


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.)

MDN Reference

Inherited from​

Document.currentScript


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.

MDN Reference

Inherited from​

Document.defaultView


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.

MDN Reference

Inherited from​

Document.designMode


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.

MDN Reference

Inherited from​

Document.dir


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.

MDN Reference

Inherited from​

Document.doctype


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.DOCUMENT_NODE


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​

Document.DOCUMENT_TYPE_NODE


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).

MDN Reference

Inherited from​

Document.documentElement


documentURI​

readonly documentURI: string;

The documentURI read-only property of the Document interface returns the document location as a string.

MDN Reference

Inherited from​

Document.documentURI


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​

MDN Reference

Inherited from​

Document.domain


ELEMENT_NODE​

readonly ELEMENT_NODE: 1;

node is an element.

Inherited from​

Document.ELEMENT_NODE


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.

MDN Reference

Inherited from​

Document.embeds


ENTITY_NODE​

readonly ENTITY_NODE: 6;

Inherited from​

Document.ENTITY_NODE


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​

MDN Reference

Inherited from​

Document.fgColor


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.

MDN Reference

Inherited from​

Document.firstChild


firstElementChild​

readonly firstElementChild: Element | null;

Returns the first child that is an element, and null otherwise.

MDN Reference

Inherited from​

Document.firstElementChild


fonts​

readonly fonts: FontFaceSet;

MDN Reference

Inherited from​

Document.fonts


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.

MDN Reference

Inherited from​

Document.forms


fragmentDirective​

readonly fragmentDirective: FragmentDirective;

The fragmentDirective read-only property of the Document interface returns the FragmentDirective for the current document.

MDN Reference

Inherited from​

Document.fragmentDirective


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​

MDN Reference

Inherited from​

Document.fullscreen


fullscreenElement​

readonly fullscreenElement: Element | null;

Returns document's fullscreen element.

MDN Reference

Inherited from​

Document.fullscreenElement


fullscreenEnabled​

readonly fullscreenEnabled: boolean;

The read-only fullscreenEnabled property on the Document interface indicates whether or not fullscreen mode is available.

MDN Reference

Inherited from​

Document.fullscreenEnabled


readonly head: HTMLHeadElement;

The head read-only property of the Document interface returns the <head> element of the current document.

MDN Reference

Inherited from​

Document.head


hidden​

readonly hidden: boolean;

The Document.hidden read-only property returns a Boolean value indicating if the page is considered hidden or not.

MDN Reference

Inherited from​

Document.hidden


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.

MDN Reference

Inherited from​

Document.images


implementation​

readonly implementation: DOMImplementation;

The Document.implementation property returns a DOMImplementation object associated with the current document.

MDN Reference

Inherited from​

Document.implementation


inputEncoding​

readonly inputEncoding: string;

Deprecated​

This is a legacy alias of characterSet.

MDN Reference

Inherited from​

Document.inputEncoding


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.

MDN Reference

Inherited from​

Document.isConnected


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.

MDN Reference

Inherited from​

Document.lastChild


lastElementChild​

readonly lastElementChild: Element | null;

Returns the last child that is an element, and null otherwise.

MDN Reference

Inherited from​

Document.lastElementChild


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.

MDN Reference

Inherited from​

Document.lastModified


linkColor​

linkColor: string;

The Document.linkColor property gets/sets the color of links within the document.

Deprecated​

MDN Reference

Inherited from​

Document.linkColor


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.

MDN Reference

Inherited from​

Document.links


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.

MDN Reference

Inherited from​

Document.nextSibling


nodeName​

readonly nodeName: string;

The read-only nodeName property of Node returns the name of the current node as a string.

MDN Reference

Inherited from​

Document.nodeName


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.

MDN Reference

Inherited from​

Document.nodeType


nodeValue​

nodeValue: string | null;

The nodeValue property of the Node interface returns or sets the value of the current node.

MDN Reference

Inherited from​

Document.nodeValue


NOTATION_NODE​

readonly NOTATION_NODE: 12;

Inherited from​

Document.NOTATION_NODE


onabort​

onabort: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onabort


onanimationcancel​

onanimationcancel: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onanimationcancel


onanimationend​

onanimationend: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onanimationend


onanimationiteration​

onanimationiteration: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onanimationiteration


onanimationstart​

onanimationstart: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onanimationstart


onauxclick​

onauxclick: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onauxclick


onbeforeinput​

onbeforeinput: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onbeforeinput


onbeforematch​

onbeforematch: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onbeforematch


onbeforetoggle​

onbeforetoggle: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onbeforetoggle


onblur​

onblur: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onblur


oncancel​

oncancel: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncancel


oncanplay​

oncanplay: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncanplay


oncanplaythrough​

oncanplaythrough: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncanplaythrough


onchange​

onchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onchange


onclick​

onclick: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onclick


onclose​

onclose: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onclose


oncommand​

oncommand: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncommand


oncontextlost​

oncontextlost: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncontextlost


oncontextmenu​

oncontextmenu: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncontextmenu


oncontextrestored​

oncontextrestored: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncontextrestored


oncopy​

oncopy: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncopy


oncuechange​

oncuechange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncuechange


oncut​

oncut: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oncut


ondblclick​

ondblclick: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondblclick


ondrag​

ondrag: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondrag


ondragend​

ondragend: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondragend


ondragenter​

ondragenter: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondragenter


ondragleave​

ondragleave: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondragleave


ondragover​

ondragover: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondragover


ondragstart​

ondragstart: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondragstart


ondrop​

ondrop: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondrop


ondurationchange​

ondurationchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ondurationchange


onemptied​

onemptied: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onemptied


onended​

onended: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onended


onerror​

onerror: OnErrorEventHandler;

MDN Reference

Inherited from​

Document.onerror


onfocus​

onfocus: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onfocus


onformdata​

onformdata: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onformdata


onfullscreenchange​

onfullscreenchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onfullscreenchange


onfullscreenerror​

onfullscreenerror: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onfullscreenerror


ongotpointercapture​

ongotpointercapture: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ongotpointercapture


oninput​

oninput: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oninput


oninvalid​

oninvalid: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.oninvalid


onkeydown​

onkeydown: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onkeydown


onkeypress​

onkeypress: ((this, ev) => any) | null;

Deprecated​

MDN Reference

Inherited from​

Document.onkeypress


onkeyup​

onkeyup: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onkeyup


onload​

onload: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onload


onloadeddata​

onloadeddata: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onloadeddata


onloadedmetadata​

onloadedmetadata: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onloadedmetadata


onloadstart​

onloadstart: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onloadstart


onlostpointercapture​

onlostpointercapture: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onlostpointercapture


onmousedown​

onmousedown: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmousedown


onmouseenter​

onmouseenter: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmouseenter


onmouseleave​

onmouseleave: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmouseleave


onmousemove​

onmousemove: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmousemove


onmouseout​

onmouseout: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmouseout


onmouseover​

onmouseover: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmouseover


onmouseup​

onmouseup: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onmouseup


onpaste​

onpaste: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpaste


onpause​

onpause: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpause


onplay​

onplay: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onplay


onplaying​

onplaying: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onplaying


onpointercancel​

onpointercancel: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointercancel


onpointerdown​

onpointerdown: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerdown


onpointerenter​

onpointerenter: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerenter


onpointerleave​

onpointerleave: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerleave


onpointerlockchange​

onpointerlockchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerlockchange


onpointerlockerror​

onpointerlockerror: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerlockerror


onpointermove​

onpointermove: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointermove


onpointerout​

onpointerout: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerout


onpointerover​

onpointerover: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerover


onpointerrawupdate​

onpointerrawupdate: ((this, ev) => any) | null;

Available only in secure contexts.

MDN Reference

Inherited from​

Document.onpointerrawupdate


onpointerup​

onpointerup: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onpointerup


onprogress​

onprogress: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onprogress


onratechange​

onratechange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onratechange


onreadystatechange​

onreadystatechange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onreadystatechange


onreset​

onreset: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onreset


onresize​

onresize: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onresize


onscroll​

onscroll: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onscroll


onscrollend​

onscrollend: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onscrollend


onsecuritypolicyviolation​

onsecuritypolicyviolation: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onsecuritypolicyviolation


onseeked​

onseeked: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onseeked


onseeking​

onseeking: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onseeking


onselect​

onselect: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onselect


onselectionchange​

onselectionchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onselectionchange


onselectstart​

onselectstart: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onselectstart


onslotchange​

onslotchange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onslotchange


onstalled​

onstalled: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onstalled


onsubmit​

onsubmit: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onsubmit


onsuspend​

onsuspend: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onsuspend


ontimeupdate​

ontimeupdate: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontimeupdate


ontoggle​

ontoggle: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontoggle


ontouchcancel?​

optional ontouchcancel?: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontouchcancel


ontouchend?​

optional ontouchend?: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontouchend


ontouchmove?​

optional ontouchmove?: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontouchmove


ontouchstart?​

optional ontouchstart?: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontouchstart


ontransitioncancel​

ontransitioncancel: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontransitioncancel


ontransitionend​

ontransitionend: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontransitionend


ontransitionrun​

ontransitionrun: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontransitionrun


ontransitionstart​

ontransitionstart: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.ontransitionstart


onvisibilitychange​

onvisibilitychange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onvisibilitychange


onvolumechange​

onvolumechange: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onvolumechange


onwaiting​

onwaiting: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onwaiting


onwebkitanimationend​

onwebkitanimationend: ((this, ev) => any) | null;

Deprecated​

This is a legacy alias of onanimationend.

MDN Reference

Inherited from​

Document.onwebkitanimationend


onwebkitanimationiteration​

onwebkitanimationiteration: ((this, ev) => any) | null;

Deprecated​

This is a legacy alias of onanimationiteration.

MDN Reference

Inherited from​

Document.onwebkitanimationiteration


onwebkitanimationstart​

onwebkitanimationstart: ((this, ev) => any) | null;

Deprecated​

This is a legacy alias of onanimationstart.

MDN Reference

Inherited from​

Document.onwebkitanimationstart


onwebkittransitionend​

onwebkittransitionend: ((this, ev) => any) | null;

Deprecated​

This is a legacy alias of ontransitionend.

MDN Reference

Inherited from​

Document.onwebkittransitionend


onwheel​

onwheel: ((this, ev) => any) | null;

MDN Reference

Inherited from​

Document.onwheel


ownerDocument​

readonly ownerDocument: null;

The read-only ownerDocument property of the Node interface returns the top-level document object of the node.

MDN Reference

Inherited from​

Document.ownerDocument


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.

MDN Reference

Inherited from​

Document.parentElement


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.

MDN Reference

Inherited from​

Document.parentNode


pictureInPictureElement​

readonly pictureInPictureElement: Element | null;

MDN Reference

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.

MDN Reference

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.

MDN Reference

Inherited from​

Document.plugins


pointerLockElement​

readonly pointerLockElement: Element | null;

MDN Reference

Inherited from​

Document.pointerLockElement


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.

MDN Reference

Inherited from​

Document.previousSibling


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.

MDN Reference

Inherited from​

Document.readyState


referrer​

readonly referrer: string;

The Document.referrer property returns the URI of the page that linked to this page.

MDN Reference

Inherited from​

Document.referrer


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​

MDN Reference

Inherited from​

Document.rootElement


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.

MDN Reference

Inherited from​

Document.scripts


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.

MDN Reference

Inherited from​

Document.scrollingElement


styleSheets​

readonly styleSheets: StyleSheetList;

MDN Reference

Inherited from​

Document.styleSheets


TEXT_NODE​

readonly TEXT_NODE: 3;

node is a Text node.

Inherited from​

Document.TEXT_NODE


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.

MDN Reference

Inherited from​

Document.timeline


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>.

MDN Reference

Inherited from​

Document.title


URL​

readonly URL: string;

The URL read-only property of the Document interface returns the document location as a string.

MDN Reference

Inherited from​

Document.URL


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.

MDN Reference

Inherited from​

Document.visibilityState


vlinkColor​

vlinkColor: string;

The Document.vlinkColor property gets/sets the color of links that the user has visited in the document.

Deprecated​

MDN Reference

Inherited from​

Document.vlinkColor