Document interface

The Document interface represents any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.

MDN Reference

Extends

Node,DocumentOrShadowRoot,FontFaceSource,GlobalEventHandlers,NonElementParentNode,ParentNode,XPathEvaluatorBase

Properties

alinkColor

Returns or sets the color of an active link in the document body.

all

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

anchors

The anchors read-only property of the An HTMLCollection.

applets

The applets property of the Document returns an empty HTMLCollection.

bgColor

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

body

The Document.body property represents the null if no such element exists.

MDN Reference

characterSet

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

MDN Reference

charset
compatMode

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

MDN Reference

contentType

The Document.contentType read-only property returns the MIME type that the document is being rendered as.

MDN Reference

cookie

The Document property cookie lets you read and write cookies associated with the document.

MDN Reference

currentScript

The Document.currentScript property returns the script element whose script is currently being processed and isn't a JavaScript module.

MDN Reference

defaultView

In browsers, document.defaultView returns the This property is read-only.

MDN Reference

designMode

document.designMode controls whether the entire document is editable.

MDN Reference

dir

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.

MDN Reference

doctype

The doctype read-only property of the Document interface is a DocumentType object representing the Doctype associated with the current document.

MDN Reference

documentElement

The documentElement read-only property of the Document interface returns the example, the html element for HTML documents).

MDN Reference

documentURI

The documentURI read-only property of the A string.

MDN Reference

domain

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.

embeds

The embeds read-only property of the An HTMLCollection.

MDN Reference

fgColor

fgColor gets/sets the foreground color, or text color, of the current document.

forms

The forms read-only property of the Document interface returns an HTMLCollection listing all the form elements contained in the document.

MDN Reference

fragmentDirective

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

MDN Reference

fullscreen

The obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.

fullscreenEnabled

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

MDN Reference

head

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

MDN Reference

hidden

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

MDN Reference

images

The images read-only property of the Document interface returns a collection of the images in the current HTML document.

MDN Reference

implementation

The Document.implementation property returns a A DOMImplementation object.

MDN Reference

inputEncoding
lastModified

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

linkColor

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

links

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

location

The Document.location read-only property returns a and provides methods for changing that URL and loading another URL.

MDN Reference

mozCancelFullScreen
msExitFullscreen
onfullscreenchange

MDN Reference

onfullscreenerror

MDN Reference

onpointerlockchange

MDN Reference

onpointerlockerror

MDN Reference

onreadystatechange

MDN Reference

onvisibilitychange

MDN Reference

ownerDocument

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

MDN Reference

pictureInPictureEnabled

The read-only pictureInPictureEnabled property of the available.

MDN Reference

plugins

The plugins read-only property of the containing one or more HTMLEmbedElements representing the An HTMLCollection.

MDN Reference

readyState

The Document.readyState property describes the loading state of the document.

MDN Reference

referrer

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

MDN Reference

rootElement

Document.rootElement returns the Element that is the root element of the document if it is an documents.

scripts

The scripts property of the Document interface returns a list of the script elements in the document.

MDN Reference

scrollingElement

The scrollingElement read-only property of the scrolls the document.

MDN Reference

textContent

MDN Reference

timeline

The timeline readonly property of the Document interface represents the default timeline of the current document.

MDN Reference

title

The document.title property gets or sets the current title of the document.

MDN Reference

URL

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

MDN Reference

visibilityState

The Document.visibilityState read-only property returns the visibility of the document.

MDN Reference

vlinkColor

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

webkitExitFullscreen

Inherited Properties

activeElement

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

adoptedStyleSheets

MDN Reference

ATTRIBUTE_NODE
baseURI

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

MDN Reference

CDATA_SECTION_NODE

node is a CDATASection node.

childElementCount

MDN Reference

childNodes

The read-only childNodes property of the Node interface returns a live the first child node is assigned index 0.

MDN Reference

children

Returns the child elements.

MDN Reference

COMMENT_NODE

node is a Comment node.

DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

DOCUMENT_NODE

node is a document.

DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED

Set when node and other are not in the same tree.

DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

DOCUMENT_TYPE_NODE

node is a doctype.

ELEMENT_NODE

node is an element.

ENTITY_NODE
ENTITY_REFERENCE_NODE
firstChild

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

firstElementChild

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

MDN Reference

fonts

MDN Reference

fullscreenElement

Returns document's fullscreen element.

MDN Reference

isConnected

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

lastChild

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

lastElementChild

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

MDN Reference

nextSibling

The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null if the specified node is the last child in the parent element.

MDN Reference

nodeName

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

MDN Reference

nodeType

The read-only nodeType property of a Node interface is an integer that identifies what the node is.

MDN Reference

nodeValue

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

MDN Reference

NOTATION_NODE
onabort

MDN Reference

onanimationcancel

MDN Reference

onanimationend

MDN Reference

onanimationiteration

MDN Reference

onanimationstart

MDN Reference

onauxclick

MDN Reference

onbeforeinput

MDN Reference

onbeforematch

MDN Reference

onbeforetoggle

MDN Reference

onblur

MDN Reference

oncancel

MDN Reference

oncanplay

MDN Reference

oncanplaythrough

MDN Reference

onchange

MDN Reference

onclick

MDN Reference

onclose

MDN Reference

oncontextlost

MDN Reference

oncontextmenu

MDN Reference

oncontextrestored

MDN Reference

oncopy

MDN Reference

oncuechange

MDN Reference

oncut

MDN Reference

ondblclick

MDN Reference

ondrag

MDN Reference

ondragend

MDN Reference

ondragenter

MDN Reference

ondragleave

MDN Reference

ondragover

MDN Reference

ondragstart

MDN Reference

ondrop

MDN Reference

ondurationchange

MDN Reference

onemptied

MDN Reference

onended

MDN Reference

onerror

MDN Reference

onfocus

MDN Reference

onformdata

MDN Reference

ongotpointercapture

MDN Reference

oninput

MDN Reference

oninvalid

MDN Reference

onkeydown

MDN Reference

onkeypress
onkeyup

MDN Reference

onload

MDN Reference

onloadeddata

MDN Reference

onloadedmetadata

MDN Reference

onloadstart

MDN Reference

onlostpointercapture

MDN Reference

onmousedown

MDN Reference

onmouseenter

MDN Reference

onmouseleave

MDN Reference

onmousemove

MDN Reference

onmouseout

MDN Reference

onmouseover

MDN Reference

onmouseup

MDN Reference

onpaste

MDN Reference

onpause

MDN Reference

onplay

MDN Reference

onplaying

MDN Reference

onpointercancel

MDN Reference

onpointerdown

MDN Reference

onpointerenter

MDN Reference

onpointerleave

MDN Reference

onpointermove

MDN Reference

onpointerout

MDN Reference

onpointerover

MDN Reference

onpointerrawupdate

Available only in secure contexts.

MDN Reference

onpointerup

MDN Reference

onprogress

MDN Reference

onratechange

MDN Reference

onreset

MDN Reference

onresize

MDN Reference

onscroll

MDN Reference

onscrollend

MDN Reference

onsecuritypolicyviolation

MDN Reference

onseeked

MDN Reference

onseeking

MDN Reference

onselect

MDN Reference

onselectionchange

MDN Reference

onselectstart

MDN Reference

onslotchange

MDN Reference

onstalled

MDN Reference

onsubmit

MDN Reference

onsuspend

MDN Reference

ontimeupdate

MDN Reference

ontoggle

MDN Reference

ontouchcancel

MDN Reference

ontouchend

MDN Reference

ontouchmove

MDN Reference

ontouchstart

MDN Reference

ontransitioncancel

MDN Reference

ontransitionend

MDN Reference

ontransitionrun

MDN Reference

ontransitionstart

MDN Reference

onvolumechange

MDN Reference

onwaiting

MDN Reference

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel

MDN Reference

parentElement

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.

MDN Reference

parentNode

The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.

MDN Reference

pictureInPictureElement

MDN Reference

pointerLockElement

MDN Reference

previousSibling

The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's or null if the specified node is the first in that list.

MDN Reference

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

styleSheets

MDN Reference

TEXT_NODE

node is a Text node.

Methods

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)
addEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | AddEventListenerOptions)

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

adoptNode<T>(T)

Document.adoptNode() transfers a node/dom from another Document into the method's document.

MDN Reference

captureEvents()
caretPositionFromPoint(number, number, CaretPositionFromPointOptions)

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

caretRangeFromPoint(number, number)
clear()

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

close()

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

MDN Reference

createAttribute(string)

The Document.createAttribute() method creates a new attribute node, and returns it.

MDN Reference

createAttributeNS(string | null, string)

The Document.createAttributeNS() method creates a new attribute node with the specified namespace URI and qualified name, and returns it.

MDN Reference

createCDATASection(string)

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

MDN Reference

createComment(string)

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

MDN Reference

createDocumentFragment()

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

MDN Reference

createElement(string, ElementCreationOptions)
createElement<K>(K, ElementCreationOptions)

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

createElement<K>(K, ElementCreationOptions)
createElementNS("http://www.w3.org/1998/Math/MathML", string)
createElementNS("http://www.w3.org/1999/xhtml", string)

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

MDN Reference

createElementNS("http://www.w3.org/2000/svg", string)
createElementNS(string | null, string, ElementCreationOptions)
createElementNS(string | null, string, string | ElementCreationOptions)
createElementNS<K>("http://www.w3.org/1998/Math/MathML", K)
createElementNS<K>("http://www.w3.org/2000/svg", K)
createEvent("AnimationEvent")

Creates an event of the type specified.

createEvent("AnimationPlaybackEvent")
createEvent("AudioProcessingEvent")
createEvent("BeforeUnloadEvent")
createEvent("BlobEvent")
createEvent("ClipboardEvent")
createEvent("CloseEvent")
createEvent("CompositionEvent")
createEvent("ContentVisibilityAutoStateChangeEvent")
createEvent("CookieChangeEvent")
createEvent("CustomEvent")
createEvent("DeviceMotionEvent")
createEvent("DeviceOrientationEvent")
createEvent("DragEvent")
createEvent("ErrorEvent")
createEvent("Event")
createEvent("Events")
createEvent("FocusEvent")
createEvent("FontFaceSetLoadEvent")
createEvent("FormDataEvent")
createEvent("GamepadEvent")
createEvent("HashChangeEvent")
createEvent("IDBVersionChangeEvent")
createEvent("InputEvent")
createEvent("KeyboardEvent")
createEvent("MediaEncryptedEvent")
createEvent("MediaKeyMessageEvent")
createEvent("MediaQueryListEvent")
createEvent("MediaStreamTrackEvent")
createEvent("MessageEvent")
createEvent("MIDIConnectionEvent")
createEvent("MIDIMessageEvent")
createEvent("MouseEvent")
createEvent("MouseEvents")
createEvent("OfflineAudioCompletionEvent")
createEvent("PageRevealEvent")
createEvent("PageSwapEvent")
createEvent("PageTransitionEvent")
createEvent("PaymentMethodChangeEvent")
createEvent("PaymentRequestUpdateEvent")
createEvent("PictureInPictureEvent")
createEvent("PointerEvent")
createEvent("PopStateEvent")
createEvent("ProgressEvent")
createEvent("PromiseRejectionEvent")
createEvent("RTCDataChannelEvent")
createEvent("RTCDTMFToneChangeEvent")
createEvent("RTCErrorEvent")
createEvent("RTCPeerConnectionIceErrorEvent")
createEvent("RTCPeerConnectionIceEvent")
createEvent("RTCTrackEvent")
createEvent("SecurityPolicyViolationEvent")
createEvent("SpeechSynthesisErrorEvent")
createEvent("SpeechSynthesisEvent")
createEvent("StorageEvent")
createEvent("SubmitEvent")
createEvent("TextEvent")
createEvent("ToggleEvent")
createEvent("TouchEvent")
createEvent("TrackEvent")
createEvent("TransitionEvent")
createEvent("UIEvent")
createEvent("UIEvents")
createEvent("WebGLContextEvent")
createEvent("WheelEvent")
createEvent(string)
createNodeIterator(Node, number, NodeFilter | null)

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

MDN Reference

createProcessingInstruction(string, string)

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

MDN Reference

createRange()

The Document.createRange() method returns a new js-nolint createRange() None.

MDN Reference

createTextNode(string)

Creates a new Text node.

MDN Reference

createTreeWalker(Node, number, NodeFilter | null)

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

MDN Reference

execCommand(string, boolean, string)

The execCommand method implements multiple different commands.

exitFullscreen()

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.

MDN Reference

exitPictureInPicture()

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.

MDN Reference

exitPointerLock()

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

MDN Reference

getElementById(string)

Returns the first element within node's descendants whose ID is elementId.

MDN Reference

getElementsByClassName(string)

The getElementsByClassName method of of all child elements which have all of the given class name(s).

MDN Reference

getElementsByName(string)

The getElementsByName() method of the Document object returns a NodeList Collection of elements with a given name attribute in the document.

MDN Reference

getElementsByTagName(string)
getElementsByTagName<K>(K)

The getElementsByTagName method of The complete document is searched, including the root node.

MDN Reference

getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagName<K>(K)
getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)
getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

Returns a list of elements with the given tag name belonging to the given namespace.

MDN Reference

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)
getElementsByTagNameNS(string | null, string)
getSelection()

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

hasFocus()

The hasFocus() method of the Document interface returns a boolean value indicating whether the document or any element inside the document has focus.

MDN Reference

hasStorageAccess()

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

importNode<T>(T, boolean | ImportNodeOptions)

The Document object's importNode() method creates a copy of a inserted into the current document later.

MDN Reference

open(string | URL, string, string)
open(string, string)

The Document.open() method opens a document for This does come with some side effects.

MDN Reference

queryCommandEnabled(string)

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

queryCommandIndeterm(string)
queryCommandState(string)

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

queryCommandSupported(string)

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

queryCommandValue(string)
releaseEvents()
removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)
removeEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | EventListenerOptions)

The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

MDN Reference

requestStorageAccess()

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.

MDN Reference

startViewTransition(ViewTransitionUpdateCallback | StartViewTransitionOptions)

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

write(string[])

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

writeln(string[])

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.

MDN Reference

Inherited Methods

append((string | Node)[])

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

appendChild<T>(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

cloneNode(boolean)

The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called.

MDN Reference

compareDocumentPosition(Node)

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

contains(Node | null)

The contains() method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.

MDN Reference

createExpression(string, XPathNSResolver | null)

MDN Reference

createNSResolver(Node)
dispatchEvent(Event)

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

MDN Reference

elementFromPoint(number, number)
elementsFromPoint(number, number)
evaluate(string, Node, XPathNSResolver | null, number, XPathResult | null)

MDN Reference

getAnimations()

MDN Reference

getRootNode(GetRootNodeOptions)

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

hasChildNodes()

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

MDN Reference

insertBefore<T>(T, Node | null)

The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.

MDN Reference

isDefaultNamespace(string | null)

The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument.

MDN Reference

isEqualNode(Node | null)

The isEqualNode() method of the Node interface tests whether two nodes are equal.

MDN Reference

isSameNode(Node | null)

The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator.

MDN Reference

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

MDN Reference

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

MDN Reference

normalize()

The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form.

MDN Reference

prepend((string | Node)[])

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

querySelector<E>(string)
querySelector<K>(K)

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

MDN Reference

querySelector<K>(K)
querySelector<K>(K)
querySelector<K>(K)
querySelectorAll<E>(string)
querySelectorAll<K>(K)

Returns all element descendants of node that match selectors.

MDN Reference

querySelectorAll<K>(K)
querySelectorAll<K>(K)
querySelectorAll<K>(K)
removeChild<T>(T)

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

MDN Reference

replaceChild<T>(Node, T)

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

MDN Reference

replaceChildren((string | Node)[])

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

Property Details

alinkColor

Warning

This API is now deprecated.

MDN Reference

Returns or sets the color of an active link in the document body.

alinkColor: string

Property Value

string

all

Warning

This API is now deprecated.

MDN Reference

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

all: HTMLAllCollection

Property Value

HTMLAllCollection

anchors

Warning

This API is now deprecated.

MDN Reference

The anchors read-only property of the An HTMLCollection.

anchors: HTMLCollectionOf<HTMLAnchorElement>

Property Value

HTMLCollectionOf<HTMLAnchorElement>

applets

Warning

This API is now deprecated.

MDN Reference

The applets property of the Document returns an empty HTMLCollection.

applets: HTMLCollection

Property Value

HTMLCollection

bgColor

Warning

This API is now deprecated.

MDN Reference

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

bgColor: string

Property Value

string

body

The Document.body property represents the null if no such element exists.

MDN Reference

body: HTMLElement

Property Value

HTMLElement

characterSet

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

MDN Reference

characterSet: string

Property Value

string

charset

Warning

This API is now deprecated.

This is a legacy alias of characterSet.

MDN Reference

charset: string

Property Value

string

compatMode

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

MDN Reference

compatMode: string

Property Value

string

contentType

The Document.contentType read-only property returns the MIME type that the document is being rendered as.

MDN Reference

contentType: string

Property Value

string

The Document property cookie lets you read and write cookies associated with the document.

MDN Reference

cookie: string

Property Value

string

currentScript

The Document.currentScript property returns the script element whose script is currently being processed and isn't a JavaScript module.

MDN Reference

currentScript: HTMLOrSVGScriptElement | null

Property Value

HTMLOrSVGScriptElement | null

defaultView

In browsers, document.defaultView returns the This property is read-only.

MDN Reference

defaultView: (Window & typeof globalThis) | null

Property Value

(Window & typeof globalThis) | null

designMode

document.designMode controls whether the entire document is editable.

MDN Reference

designMode: string

Property Value

string

dir

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.

MDN Reference

dir: string

Property Value

string

doctype

The doctype read-only property of the Document interface is a DocumentType object representing the Doctype associated with the current document.

MDN Reference

doctype: DocumentType | null

Property Value

DocumentType | null

documentElement

The documentElement read-only property of the Document interface returns the example, the html element for HTML documents).

MDN Reference

documentElement: HTMLElement

Property Value

HTMLElement

documentURI

The documentURI read-only property of the A string.

MDN Reference

documentURI: string

Property Value

string

domain

Warning

This API is now deprecated.

MDN Reference

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.

domain: string

Property Value

string

embeds

The embeds read-only property of the An HTMLCollection.

MDN Reference

embeds: HTMLCollectionOf<HTMLEmbedElement>

Property Value

HTMLCollectionOf<HTMLEmbedElement>

fgColor

Warning

This API is now deprecated.

MDN Reference

fgColor gets/sets the foreground color, or text color, of the current document.

fgColor: string

Property Value

string

forms

The forms read-only property of the Document interface returns an HTMLCollection listing all the form elements contained in the document.

MDN Reference

forms: HTMLCollectionOf<HTMLFormElement>

Property Value

HTMLCollectionOf<HTMLFormElement>

fragmentDirective

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

MDN Reference

fragmentDirective: FragmentDirective

Property Value

FragmentDirective

fullscreen

Warning

This API is now deprecated.

MDN Reference

The obsolete Document interface's fullscreen read-only property reports whether or not the document is currently displaying content in fullscreen mode.

fullscreen: boolean

Property Value

boolean

fullscreenEnabled

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

MDN Reference

fullscreenEnabled: boolean

Property Value

boolean

head

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

MDN Reference

head: HTMLHeadElement

Property Value

HTMLHeadElement

hidden

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

MDN Reference

hidden: boolean

Property Value

boolean

images

The images read-only property of the Document interface returns a collection of the images in the current HTML document.

MDN Reference

images: HTMLCollectionOf<HTMLImageElement>

Property Value

HTMLCollectionOf<HTMLImageElement>

implementation

The Document.implementation property returns a A DOMImplementation object.

MDN Reference

implementation: DOMImplementation

Property Value

DOMImplementation

inputEncoding

Warning

This API is now deprecated.

This is a legacy alias of characterSet.

MDN Reference

inputEncoding: string

Property Value

string

lastModified

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

lastModified: string

Property Value

string

linkColor

Warning

This API is now deprecated.

MDN Reference

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

linkColor: string

Property Value

string

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

links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

Property Value

HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

location

The Document.location read-only property returns a and provides methods for changing that URL and loading another URL.

MDN Reference

Location location

Property Value

Location

mozCancelFullScreen

mozCancelFullScreen: any

Property Value

any

msExitFullscreen

msExitFullscreen: any

Property Value

any

onfullscreenchange

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

onfullscreenerror

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

onpointerlockchange

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

onpointerlockerror

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

onreadystatechange

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

onvisibilitychange

MDN Reference

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

Property Value

(this: Document, ev: Event) => any | null

ownerDocument

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

MDN Reference

ownerDocument: null

Property Value

null

pictureInPictureEnabled

The read-only pictureInPictureEnabled property of the available.

MDN Reference

pictureInPictureEnabled: boolean

Property Value

boolean

plugins

The plugins read-only property of the containing one or more HTMLEmbedElements representing the An HTMLCollection.

MDN Reference

plugins: HTMLCollectionOf<HTMLEmbedElement>

Property Value

HTMLCollectionOf<HTMLEmbedElement>

readyState

The Document.readyState property describes the loading state of the document.

MDN Reference

readyState: DocumentReadyState

Property Value

DocumentReadyState

referrer

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

MDN Reference

referrer: string

Property Value

string

rootElement

Warning

This API is now deprecated.

MDN Reference

Document.rootElement returns the Element that is the root element of the document if it is an documents.

rootElement: SVGSVGElement | null

Property Value

SVGSVGElement | null

scripts

The scripts property of the Document interface returns a list of the script elements in the document.

MDN Reference

scripts: HTMLCollectionOf<HTMLScriptElement>

Property Value

HTMLCollectionOf<HTMLScriptElement>

scrollingElement

The scrollingElement read-only property of the scrolls the document.

MDN Reference

scrollingElement: Element | null

Property Value

Element | null

textContent

MDN Reference

null textContent

Property Value

null

timeline

The timeline readonly property of the Document interface represents the default timeline of the current document.

MDN Reference

timeline: DocumentTimeline

Property Value

DocumentTimeline

title

The document.title property gets or sets the current title of the document.

MDN Reference

title: string

Property Value

string

URL

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

MDN Reference

URL: string

Property Value

string

visibilityState

The Document.visibilityState read-only property returns the visibility of the document.

MDN Reference

visibilityState: DocumentVisibilityState

Property Value

DocumentVisibilityState

vlinkColor

Warning

This API is now deprecated.

MDN Reference

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

vlinkColor: string

Property Value

string

webkitExitFullscreen

webkitExitFullscreen: void

Property Value

void

Inherited Property Details

activeElement

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

activeElement: Element | null

Property Value

Element | null

Inherited From DocumentOrShadowRoot.activeElement

adoptedStyleSheets

MDN Reference

adoptedStyleSheets: CSSStyleSheet[]

Property Value

CSSStyleSheet[]

Inherited From DocumentOrShadowRoot.adoptedStyleSheets

ATTRIBUTE_NODE

ATTRIBUTE_NODE: 2

Property Value

2

Inherited From Node.ATTRIBUTE_NODE

baseURI

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

MDN Reference

baseURI: string

Property Value

string

Inherited From Node.baseURI

CDATA_SECTION_NODE

node is a CDATASection node.

CDATA_SECTION_NODE: 4

Property Value

4

Inherited From Node.CDATA_SECTION_NODE

childElementCount

MDN Reference

childElementCount: number

Property Value

number

Inherited From ParentNode.childElementCount

childNodes

The read-only childNodes property of the Node interface returns a live the first child node is assigned index 0.

MDN Reference

childNodes: NodeListOf<ChildNode>

Property Value

NodeListOf<ChildNode>

Inherited From Node.childNodes

children

Returns the child elements.

MDN Reference

children: HTMLCollection

Property Value

HTMLCollection

Inherited From ParentNode.children

COMMENT_NODE

node is a Comment node.

COMMENT_NODE: 8

Property Value

8

Inherited From Node.COMMENT_NODE

DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

DOCUMENT_FRAGMENT_NODE: 11

Property Value

11

Inherited From Node.DOCUMENT_FRAGMENT_NODE

DOCUMENT_NODE

node is a document.

DOCUMENT_NODE: 9

Property Value

9

Inherited From Node.DOCUMENT_NODE

DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINED_BY: 16

Property Value

16

Inherited From Node.DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

DOCUMENT_POSITION_CONTAINS: 8

Property Value

8

Inherited From Node.DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_DISCONNECTED

Set when node and other are not in the same tree.

DOCUMENT_POSITION_DISCONNECTED: 1

Property Value

1

Inherited From Node.DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

DOCUMENT_POSITION_FOLLOWING: 4

Property Value

4

Inherited From Node.DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32

Property Value

32

Inherited From Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

DOCUMENT_POSITION_PRECEDING: 2

Property Value

2

Inherited From Node.DOCUMENT_POSITION_PRECEDING

DOCUMENT_TYPE_NODE

node is a doctype.

DOCUMENT_TYPE_NODE: 10

Property Value

10

Inherited From Node.DOCUMENT_TYPE_NODE

ELEMENT_NODE

node is an element.

ELEMENT_NODE: 1

Property Value

1

Inherited From Node.ELEMENT_NODE

ENTITY_NODE

ENTITY_NODE: 6

Property Value

6

Inherited From Node.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: 5

Property Value

5

Inherited From Node.ENTITY_REFERENCE_NODE

firstChild

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

firstChild: ChildNode | null

Property Value

ChildNode | null

Inherited From Node.firstChild

firstElementChild

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

MDN Reference

firstElementChild: Element | null

Property Value

Element | null

Inherited From ParentNode.firstElementChild

fonts

MDN Reference

fonts: FontFaceSet

Property Value

FontFaceSet

Inherited From FontFaceSource.fonts

fullscreenElement

Returns document's fullscreen element.

MDN Reference

fullscreenElement: Element | null

Property Value

Element | null

Inherited From DocumentOrShadowRoot.fullscreenElement

isConnected

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

isConnected: boolean

Property Value

boolean

Inherited From Node.isConnected

lastChild

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

lastChild: ChildNode | null

Property Value

ChildNode | null

Inherited From Node.lastChild

lastElementChild

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

MDN Reference

lastElementChild: Element | null

Property Value

Element | null

Inherited From ParentNode.lastElementChild

nextSibling

The read-only nextSibling property of the Node interface returns the node immediately following the specified one in their parent's Node.childNodes, or returns null if the specified node is the last child in the parent element.

MDN Reference

nextSibling: ChildNode | null

Property Value

ChildNode | null

Inherited From Node.nextSibling

nodeName

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

MDN Reference

nodeName: string

Property Value

string

Inherited From Node.nodeName

nodeType

The read-only nodeType property of a Node interface is an integer that identifies what the node is.

MDN Reference

nodeType: number

Property Value

number

Inherited From Node.nodeType

nodeValue

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

MDN Reference

nodeValue: string | null

Property Value

string | null

Inherited From Node.nodeValue

NOTATION_NODE

NOTATION_NODE: 12

Property Value

12

Inherited From Node.NOTATION_NODE

onabort

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From GlobalEventHandlers.onabort

onanimationcancel

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationcancel

onanimationend

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationend

onanimationiteration

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationiteration

onanimationstart

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: AnimationEvent) => any | null

Inherited From GlobalEventHandlers.onanimationstart

onauxclick

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onauxclick

onbeforeinput

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: InputEvent) => any | null

Inherited From GlobalEventHandlers.onbeforeinput

onbeforematch

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onbeforematch

onbeforetoggle

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From GlobalEventHandlers.onbeforetoggle

onblur

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From GlobalEventHandlers.onblur

oncancel

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncancel

oncanplay

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncanplay

oncanplaythrough

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncanplaythrough

onchange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onchange

onclick

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onclick

onclose

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onclose

oncontextlost

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncontextlost

oncontextmenu

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.oncontextmenu

oncontextrestored

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncontextrestored

oncopy

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.oncopy

oncuechange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oncuechange

oncut

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.oncut

ondblclick

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.ondblclick

ondrag

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondrag

ondragend

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragend

ondragenter

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragenter

ondragleave

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragleave

ondragover

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragover

ondragstart

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondragstart

ondrop

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: DragEvent) => any | null

Inherited From GlobalEventHandlers.ondrop

ondurationchange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.ondurationchange

onemptied

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onemptied

onended

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onended

onerror

MDN Reference

onerror: OnErrorEventHandler

Property Value

OnErrorEventHandler

Inherited From GlobalEventHandlers.onerror

onfocus

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: FocusEvent) => any | null

Inherited From GlobalEventHandlers.onfocus

onformdata

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: FormDataEvent) => any | null

Inherited From GlobalEventHandlers.onformdata

ongotpointercapture

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.ongotpointercapture

oninput

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oninput

oninvalid

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.oninvalid

onkeydown

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeydown

onkeypress

Warning

This API is now deprecated.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeypress

onkeyup

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: KeyboardEvent) => any | null

Inherited From GlobalEventHandlers.onkeyup

onload

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onload

onloadeddata

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadeddata

onloadedmetadata

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadedmetadata

onloadstart

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onloadstart

onlostpointercapture

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onlostpointercapture

onmousedown

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmousedown

onmouseenter

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseenter

onmouseleave

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseleave

onmousemove

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmousemove

onmouseout

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseout

onmouseover

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseover

onmouseup

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: MouseEvent) => any | null

Inherited From GlobalEventHandlers.onmouseup

onpaste

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ClipboardEvent) => any | null

Inherited From GlobalEventHandlers.onpaste

onpause

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onpause

onplay

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onplay

onplaying

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onplaying

onpointercancel

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointercancel

onpointerdown

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerdown

onpointerenter

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerenter

onpointerleave

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerleave

onpointermove

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointermove

onpointerout

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerout

onpointerover

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerover

onpointerrawupdate

Available only in secure contexts.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onpointerrawupdate

onpointerup

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: PointerEvent) => any | null

Inherited From GlobalEventHandlers.onpointerup

onprogress

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ProgressEvent) => any | null

Inherited From GlobalEventHandlers.onprogress

onratechange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onratechange

onreset

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onreset

onresize

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: UIEvent) => any | null

Inherited From GlobalEventHandlers.onresize

onscroll

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onscroll

onscrollend

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onscrollend

onsecuritypolicyviolation

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any | null

Inherited From GlobalEventHandlers.onsecuritypolicyviolation

onseeked

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onseeked

onseeking

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onseeking

onselect

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselect

onselectionchange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselectionchange

onselectstart

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onselectstart

onslotchange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onslotchange

onstalled

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onstalled

onsubmit

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: SubmitEvent) => any | null

Inherited From GlobalEventHandlers.onsubmit

onsuspend

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onsuspend

ontimeupdate

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.ontimeupdate

ontoggle

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: ToggleEvent) => any | null

Inherited From GlobalEventHandlers.ontoggle

ontouchcancel

MDN Reference

ontouchcancel?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchcancel

ontouchend

MDN Reference

ontouchend?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchend

ontouchmove

MDN Reference

ontouchmove?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchmove

ontouchstart

MDN Reference

ontouchstart?: (this: GlobalEventHandlers, ev: TouchEvent) => any | null

Property Value

(this: GlobalEventHandlers, ev: TouchEvent) => any | null

Inherited From GlobalEventHandlers.ontouchstart

ontransitioncancel

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitioncancel

ontransitionend

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionend

ontransitionrun

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionrun

ontransitionstart

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: TransitionEvent) => any | null

Inherited From GlobalEventHandlers.ontransitionstart

onvolumechange

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onvolumechange

onwaiting

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwaiting

onwebkitanimationend

Warning

This API is now deprecated.

This is a legacy alias of onanimationend.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationend

onwebkitanimationiteration

Warning

This API is now deprecated.

This is a legacy alias of onanimationiteration.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationiteration

onwebkitanimationstart

Warning

This API is now deprecated.

This is a legacy alias of onanimationstart.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkitanimationstart

onwebkittransitionend

Warning

This API is now deprecated.

This is a legacy alias of ontransitionend.

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: Event) => any | null

Inherited From GlobalEventHandlers.onwebkittransitionend

onwheel

MDN Reference

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

Property Value

(this: GlobalEventHandlers, ev: WheelEvent) => any | null

Inherited From GlobalEventHandlers.onwheel

parentElement

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.

MDN Reference

parentElement: HTMLElement | null

Property Value

HTMLElement | null

Inherited From Node.parentElement

parentNode

The read-only parentNode property of the Node interface returns the parent of the specified node in the DOM tree.

MDN Reference

parentNode: ParentNode | null

Property Value

ParentNode | null

Inherited From Node.parentNode

pictureInPictureElement

MDN Reference

pictureInPictureElement: Element | null

Property Value

Element | null

Inherited From DocumentOrShadowRoot.pictureInPictureElement

pointerLockElement

MDN Reference

pointerLockElement: Element | null

Property Value

Element | null

Inherited From DocumentOrShadowRoot.pointerLockElement

previousSibling

The read-only previousSibling property of the Node interface returns the node immediately preceding the specified one in its parent's or null if the specified node is the first in that list.

MDN Reference

previousSibling: ChildNode | null

Property Value

ChildNode | null

Inherited From Node.previousSibling

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

PROCESSING_INSTRUCTION_NODE: 7

Property Value

7

Inherited From Node.PROCESSING_INSTRUCTION_NODE

styleSheets

MDN Reference

styleSheets: StyleSheetList

Property Value

StyleSheetList

Inherited From DocumentOrShadowRoot.styleSheets

TEXT_NODE

node is a Text node.

TEXT_NODE: 3

Property Value

3

Inherited From Node.TEXT_NODE

Method Details

addEventListener(string, EventListenerOrEventListenerObject, boolean | AddEventListenerOptions)

function addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)

Parameters

type

string

listener

EventListenerOrEventListenerObject

options

boolean | AddEventListenerOptions

addEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | AddEventListenerOptions)

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

function addEventListener<K>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions)

Parameters

type

K

listener

(this: Document, ev: DocumentEventMap[K]) => any

options

boolean | AddEventListenerOptions

adoptNode<T>(T)

Document.adoptNode() transfers a node/dom from another Document into the method's document.

MDN Reference

function adoptNode<T>(node: T): T

Parameters

node

T

Returns

T

captureEvents()

Warning

This API is now deprecated.

function captureEvents()

caretPositionFromPoint(number, number, CaretPositionFromPointOptions)

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

function caretPositionFromPoint(x: number, y: number, options?: CaretPositionFromPointOptions): CaretPosition | null

Parameters

x

number

y

number

options

CaretPositionFromPointOptions

Returns

CaretPosition | null

caretRangeFromPoint(number, number)

Warning

This API is now deprecated.

function caretRangeFromPoint(x: number, y: number): Range | null

Parameters

x

number

y

number

Returns

Range | null

clear()

Warning

This API is now deprecated.

MDN Reference

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

function clear()

close()

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

MDN Reference

function close()

createAttribute(string)

The Document.createAttribute() method creates a new attribute node, and returns it.

MDN Reference

function createAttribute(localName: string): Attr

Parameters

localName

string

Returns

Attr

createAttributeNS(string | null, string)

The Document.createAttributeNS() method creates a new attribute node with the specified namespace URI and qualified name, and returns it.

MDN Reference

function createAttributeNS(namespace: string | null, qualifiedName: string): Attr

Parameters

namespace

string | null

qualifiedName

string

Returns

Attr

createCDATASection(string)

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

MDN Reference

function createCDATASection(data: string): CDATASection

Parameters

data

string

Returns

CDATASection

createComment(string)

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

MDN Reference

function createComment(data: string): Comment

Parameters

data

string

Returns

Comment

createDocumentFragment()

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

MDN Reference

function createDocumentFragment(): DocumentFragment

Returns

DocumentFragment

createElement(string, ElementCreationOptions)

function createElement(tagName: string, options?: ElementCreationOptions): HTMLElement

Parameters

tagName

string

options

ElementCreationOptions

Returns

HTMLElement

createElement<K>(K, ElementCreationOptions)

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

function createElement<K>(tagName: K, options?: ElementCreationOptions): HTMLElementTagNameMap[K]

Parameters

tagName

K

options

ElementCreationOptions

Returns

HTMLElementTagNameMap[K]

createElement<K>(K, ElementCreationOptions)

Warning

This API is now deprecated.

function createElement<K>(tagName: K, options?: ElementCreationOptions): HTMLElementDeprecatedTagNameMap[K]

Parameters

tagName

K

options

ElementCreationOptions

Returns

HTMLElementDeprecatedTagNameMap[K]

createElementNS("http://www.w3.org/1998/Math/MathML", string)

function createElementNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: string): MathMLElement

Parameters

namespaceURI

"http://www.w3.org/1998/Math/MathML"

qualifiedName

string

Returns

MathMLElement

createElementNS("http://www.w3.org/1999/xhtml", string)

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

MDN Reference

function createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement

Parameters

namespaceURI

"http://www.w3.org/1999/xhtml"

qualifiedName

string

Returns

HTMLElement

createElementNS("http://www.w3.org/2000/svg", string)

function createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement

Parameters

namespaceURI

"http://www.w3.org/2000/svg"

qualifiedName

string

Returns

SVGElement

createElementNS(string | null, string, ElementCreationOptions)

function createElementNS(namespaceURI: string | null, qualifiedName: string, options?: ElementCreationOptions): Element

Parameters

namespaceURI

string | null

qualifiedName

string

options

ElementCreationOptions

Returns

Element

createElementNS(string | null, string, string | ElementCreationOptions)

function createElementNS(namespace: string | null, qualifiedName: string, options?: string | ElementCreationOptions): Element

Parameters

namespace

string | null

qualifiedName

string

options

string | ElementCreationOptions

Returns

Element

createElementNS<K>("http://www.w3.org/1998/Math/MathML", K)

function createElementNS<K>(namespaceURI: "http://www.w3.org/1998/Math/MathML", qualifiedName: K): MathMLElementTagNameMap[K]

Parameters

namespaceURI

"http://www.w3.org/1998/Math/MathML"

qualifiedName

K

Returns

MathMLElementTagNameMap[K]

createElementNS<K>("http://www.w3.org/2000/svg", K)

function createElementNS<K>(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: K): SVGElementTagNameMap[K]

Parameters

namespaceURI

"http://www.w3.org/2000/svg"

qualifiedName

K

Returns

SVGElementTagNameMap[K]

createEvent("AnimationEvent")

Warning

This API is now deprecated.

MDN Reference

Creates an event of the type specified.

function createEvent(eventInterface: "AnimationEvent"): AnimationEvent

Parameters

eventInterface

"AnimationEvent"

Returns

AnimationEvent

createEvent("AnimationPlaybackEvent")

function createEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEvent

Parameters

eventInterface

"AnimationPlaybackEvent"

Returns

AnimationPlaybackEvent

createEvent("AudioProcessingEvent")

function createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent

Parameters

eventInterface

"AudioProcessingEvent"

Returns

AudioProcessingEvent

createEvent("BeforeUnloadEvent")

function createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent

Parameters

eventInterface

"BeforeUnloadEvent"

Returns

BeforeUnloadEvent

createEvent("BlobEvent")

function createEvent(eventInterface: "BlobEvent"): BlobEvent

Parameters

eventInterface

"BlobEvent"

Returns

BlobEvent

createEvent("ClipboardEvent")

function createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent

Parameters

eventInterface

"ClipboardEvent"

Returns

ClipboardEvent

createEvent("CloseEvent")

function createEvent(eventInterface: "CloseEvent"): CloseEvent

Parameters

eventInterface

"CloseEvent"

Returns

CloseEvent

createEvent("CompositionEvent")

function createEvent(eventInterface: "CompositionEvent"): CompositionEvent

Parameters

eventInterface

"CompositionEvent"

Returns

CompositionEvent

createEvent("ContentVisibilityAutoStateChangeEvent")

function createEvent(eventInterface: "ContentVisibilityAutoStateChangeEvent"): ContentVisibilityAutoStateChangeEvent

Parameters

eventInterface

"ContentVisibilityAutoStateChangeEvent"

Returns

ContentVisibilityAutoStateChangeEvent

createEvent("CookieChangeEvent")

function createEvent(eventInterface: "CookieChangeEvent"): CookieChangeEvent

Parameters

eventInterface

"CookieChangeEvent"

Returns

CookieChangeEvent

createEvent("CustomEvent")

function createEvent(eventInterface: "CustomEvent"): CustomEvent

Parameters

eventInterface

"CustomEvent"

Returns

CustomEvent

createEvent("DeviceMotionEvent")

function createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent

Parameters

eventInterface

"DeviceMotionEvent"

Returns

DeviceMotionEvent

createEvent("DeviceOrientationEvent")

function createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent

Parameters

eventInterface

"DeviceOrientationEvent"

Returns

DeviceOrientationEvent

createEvent("DragEvent")

function createEvent(eventInterface: "DragEvent"): DragEvent

Parameters

eventInterface

"DragEvent"

Returns

DragEvent

createEvent("ErrorEvent")

function createEvent(eventInterface: "ErrorEvent"): ErrorEvent

Parameters

eventInterface

"ErrorEvent"

Returns

ErrorEvent

createEvent("Event")

function createEvent(eventInterface: "Event"): Event

Parameters

eventInterface

"Event"

Returns

Event

createEvent("Events")

function createEvent(eventInterface: "Events"): Event

Parameters

eventInterface

"Events"

Returns

Event

createEvent("FocusEvent")

function createEvent(eventInterface: "FocusEvent"): FocusEvent

Parameters

eventInterface

"FocusEvent"

Returns

FocusEvent

createEvent("FontFaceSetLoadEvent")

function createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent

Parameters

eventInterface

"FontFaceSetLoadEvent"

Returns

FontFaceSetLoadEvent

createEvent("FormDataEvent")

function createEvent(eventInterface: "FormDataEvent"): FormDataEvent

Parameters

eventInterface

"FormDataEvent"

Returns

FormDataEvent

createEvent("GamepadEvent")

function createEvent(eventInterface: "GamepadEvent"): GamepadEvent

Parameters

eventInterface

"GamepadEvent"

Returns

GamepadEvent

createEvent("HashChangeEvent")

function createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent

Parameters

eventInterface

"HashChangeEvent"

Returns

HashChangeEvent

createEvent("IDBVersionChangeEvent")

function createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent

Parameters

eventInterface

"IDBVersionChangeEvent"

Returns

IDBVersionChangeEvent

createEvent("InputEvent")

function createEvent(eventInterface: "InputEvent"): InputEvent

Parameters

eventInterface

"InputEvent"

Returns

InputEvent

createEvent("KeyboardEvent")

function createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent

Parameters

eventInterface

"KeyboardEvent"

Returns

KeyboardEvent

createEvent("MediaEncryptedEvent")

function createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent

Parameters

eventInterface

"MediaEncryptedEvent"

Returns

MediaEncryptedEvent

createEvent("MediaKeyMessageEvent")

function createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent

Parameters

eventInterface

"MediaKeyMessageEvent"

Returns

MediaKeyMessageEvent

createEvent("MediaQueryListEvent")

function createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent

Parameters

eventInterface

"MediaQueryListEvent"

Returns

MediaQueryListEvent

createEvent("MediaStreamTrackEvent")

function createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent

Parameters

eventInterface

"MediaStreamTrackEvent"

Returns

MediaStreamTrackEvent

createEvent("MessageEvent")

function createEvent(eventInterface: "MessageEvent"): MessageEvent

Parameters

eventInterface

"MessageEvent"

Returns

MessageEvent

createEvent("MIDIConnectionEvent")

function createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent

Parameters

eventInterface

"MIDIConnectionEvent"

Returns

MIDIConnectionEvent

createEvent("MIDIMessageEvent")

function createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEvent

Parameters

eventInterface

"MIDIMessageEvent"

Returns

MIDIMessageEvent

createEvent("MouseEvent")

function createEvent(eventInterface: "MouseEvent"): MouseEvent

Parameters

eventInterface

"MouseEvent"

Returns

MouseEvent

createEvent("MouseEvents")

function createEvent(eventInterface: "MouseEvents"): MouseEvent

Parameters

eventInterface

"MouseEvents"

Returns

MouseEvent

createEvent("OfflineAudioCompletionEvent")

function createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent

Parameters

eventInterface

"OfflineAudioCompletionEvent"

Returns

OfflineAudioCompletionEvent

createEvent("PageRevealEvent")

function createEvent(eventInterface: "PageRevealEvent"): PageRevealEvent

Parameters

eventInterface

"PageRevealEvent"

Returns

PageRevealEvent

createEvent("PageSwapEvent")

function createEvent(eventInterface: "PageSwapEvent"): PageSwapEvent

Parameters

eventInterface

"PageSwapEvent"

Returns

PageSwapEvent

createEvent("PageTransitionEvent")

function createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent

Parameters

eventInterface

"PageTransitionEvent"

Returns

PageTransitionEvent

createEvent("PaymentMethodChangeEvent")

function createEvent(eventInterface: "PaymentMethodChangeEvent"): PaymentMethodChangeEvent

Parameters

eventInterface

"PaymentMethodChangeEvent"

Returns

PaymentMethodChangeEvent

createEvent("PaymentRequestUpdateEvent")

function createEvent(eventInterface: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent

Parameters

eventInterface

"PaymentRequestUpdateEvent"

Returns

PaymentRequestUpdateEvent

createEvent("PictureInPictureEvent")

function createEvent(eventInterface: "PictureInPictureEvent"): PictureInPictureEvent

Parameters

eventInterface

"PictureInPictureEvent"

Returns

PictureInPictureEvent

createEvent("PointerEvent")

function createEvent(eventInterface: "PointerEvent"): PointerEvent

Parameters

eventInterface

"PointerEvent"

Returns

PointerEvent

createEvent("PopStateEvent")

function createEvent(eventInterface: "PopStateEvent"): PopStateEvent

Parameters

eventInterface

"PopStateEvent"

Returns

PopStateEvent

createEvent("ProgressEvent")

function createEvent(eventInterface: "ProgressEvent"): ProgressEvent

Parameters

eventInterface

"ProgressEvent"

Returns

ProgressEvent

createEvent("PromiseRejectionEvent")

function createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent

Parameters

eventInterface

"PromiseRejectionEvent"

Returns

PromiseRejectionEvent

createEvent("RTCDataChannelEvent")

function createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent

Parameters

eventInterface

"RTCDataChannelEvent"

Returns

RTCDataChannelEvent

createEvent("RTCDTMFToneChangeEvent")

function createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent

Parameters

eventInterface

"RTCDTMFToneChangeEvent"

Returns

RTCDTMFToneChangeEvent

createEvent("RTCErrorEvent")

function createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent

Parameters

eventInterface

"RTCErrorEvent"

Returns

RTCErrorEvent

createEvent("RTCPeerConnectionIceErrorEvent")

function createEvent(eventInterface: "RTCPeerConnectionIceErrorEvent"): RTCPeerConnectionIceErrorEvent

Parameters

eventInterface

"RTCPeerConnectionIceErrorEvent"

Returns

RTCPeerConnectionIceErrorEvent

createEvent("RTCPeerConnectionIceEvent")

function createEvent(eventInterface: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent

Parameters

eventInterface

"RTCPeerConnectionIceEvent"

Returns

RTCPeerConnectionIceEvent

createEvent("RTCTrackEvent")

function createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent

Parameters

eventInterface

"RTCTrackEvent"

Returns

RTCTrackEvent

createEvent("SecurityPolicyViolationEvent")

function createEvent(eventInterface: "SecurityPolicyViolationEvent"): SecurityPolicyViolationEvent

Parameters

eventInterface

"SecurityPolicyViolationEvent"

Returns

SecurityPolicyViolationEvent

createEvent("SpeechSynthesisErrorEvent")

function createEvent(eventInterface: "SpeechSynthesisErrorEvent"): SpeechSynthesisErrorEvent

Parameters

eventInterface

"SpeechSynthesisErrorEvent"

Returns

SpeechSynthesisErrorEvent

createEvent("SpeechSynthesisEvent")

function createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent

Parameters

eventInterface

"SpeechSynthesisEvent"

Returns

SpeechSynthesisEvent

createEvent("StorageEvent")

function createEvent(eventInterface: "StorageEvent"): StorageEvent

Parameters

eventInterface

"StorageEvent"

Returns

StorageEvent

createEvent("SubmitEvent")

function createEvent(eventInterface: "SubmitEvent"): SubmitEvent

Parameters

eventInterface

"SubmitEvent"

Returns

SubmitEvent

createEvent("TextEvent")

function createEvent(eventInterface: "TextEvent"): TextEvent

Parameters

eventInterface

"TextEvent"

Returns

TextEvent

createEvent("ToggleEvent")

function createEvent(eventInterface: "ToggleEvent"): ToggleEvent

Parameters

eventInterface

"ToggleEvent"

Returns

ToggleEvent

createEvent("TouchEvent")

function createEvent(eventInterface: "TouchEvent"): TouchEvent

Parameters

eventInterface

"TouchEvent"

Returns

TouchEvent

createEvent("TrackEvent")

function createEvent(eventInterface: "TrackEvent"): TrackEvent

Parameters

eventInterface

"TrackEvent"

Returns

TrackEvent

createEvent("TransitionEvent")

function createEvent(eventInterface: "TransitionEvent"): TransitionEvent

Parameters

eventInterface

"TransitionEvent"

Returns

TransitionEvent

createEvent("UIEvent")

function createEvent(eventInterface: "UIEvent"): UIEvent

Parameters

eventInterface

"UIEvent"

Returns

UIEvent

createEvent("UIEvents")

function createEvent(eventInterface: "UIEvents"): UIEvent

Parameters

eventInterface

"UIEvents"

Returns

UIEvent

createEvent("WebGLContextEvent")

function createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent

Parameters

eventInterface

"WebGLContextEvent"

Returns

WebGLContextEvent

createEvent("WheelEvent")

function createEvent(eventInterface: "WheelEvent"): WheelEvent

Parameters

eventInterface

"WheelEvent"

Returns

WheelEvent

createEvent(string)

function createEvent(eventInterface: string): Event

Parameters

eventInterface

string

Returns

Event

createNodeIterator(Node, number, NodeFilter | null)

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

MDN Reference

function createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter | null): NodeIterator

Parameters

root

Node

whatToShow

number

filter

NodeFilter | null

Returns

NodeIterator

createProcessingInstruction(string, string)

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

MDN Reference

function createProcessingInstruction(target: string, data: string): ProcessingInstruction

Parameters

target

string

data

string

Returns

ProcessingInstruction

createRange()

The Document.createRange() method returns a new js-nolint createRange() None.

MDN Reference

function createRange(): Range

Returns

Range

createTextNode(string)

Creates a new Text node.

MDN Reference

function createTextNode(data: string): Text

Parameters

data

string

Returns

Text

createTreeWalker(Node, number, NodeFilter | null)

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

MDN Reference

function createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter | null): TreeWalker

Parameters

root

Node

whatToShow

number

filter

NodeFilter | null

Returns

TreeWalker

execCommand(string, boolean, string)

Warning

This API is now deprecated.

MDN Reference

The execCommand method implements multiple different commands.

function execCommand(commandId: string, showUI?: boolean, value?: string): boolean

Parameters

commandId

string

showUI

boolean

value

string

Returns

boolean

exitFullscreen()

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.

MDN Reference

function exitFullscreen(): Promise<void>

Returns

Promise<void>

exitPictureInPicture()

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.

MDN Reference

function exitPictureInPicture(): Promise<void>

Returns

Promise<void>

exitPointerLock()

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

MDN Reference

function exitPointerLock()

getElementById(string)

Returns the first element within node's descendants whose ID is elementId.

MDN Reference

function getElementById(elementId: string): HTMLElement | null

Parameters

elementId

string

Returns

HTMLElement | null

getElementsByClassName(string)

The getElementsByClassName method of of all child elements which have all of the given class name(s).

MDN Reference

function getElementsByClassName(classNames: string): HTMLCollectionOf<Element>

Parameters

classNames

string

Returns

HTMLCollectionOf<Element>

getElementsByName(string)

The getElementsByName() method of the Document object returns a NodeList Collection of elements with a given name attribute in the document.

MDN Reference

function getElementsByName(elementName: string): NodeListOf<HTMLElement>

Parameters

elementName

string

Returns

NodeListOf<HTMLElement>

getElementsByTagName(string)

function getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>

Parameters

qualifiedName

string

Returns

HTMLCollectionOf<Element>

getElementsByTagName<K>(K)

The getElementsByTagName method of The complete document is searched, including the root node.

MDN Reference

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<HTMLElementTagNameMap[K]>

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<SVGElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<SVGElementTagNameMap[K]>

getElementsByTagName<K>(K)

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<MathMLElementTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<MathMLElementTagNameMap[K]>

getElementsByTagName<K>(K)

Warning

This API is now deprecated.

function getElementsByTagName<K>(qualifiedName: K): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

Parameters

qualifiedName

K

Returns

HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>

getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1998/Math/MathML", localName: string): HTMLCollectionOf<MathMLElement>

Parameters

namespaceURI

"http://www.w3.org/1998/Math/MathML"

localName

string

Returns

HTMLCollectionOf<MathMLElement>

getElementsByTagNameNS("http://www.w3.org/1999/xhtml", string)

Returns a list of elements with the given tag name belonging to the given namespace.

MDN Reference

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>

Parameters

namespaceURI

"http://www.w3.org/1999/xhtml"

localName

string

Returns

HTMLCollectionOf<HTMLElement>

getElementsByTagNameNS("http://www.w3.org/2000/svg", string)

function getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>

Parameters

namespaceURI

"http://www.w3.org/2000/svg"

localName

string

Returns

HTMLCollectionOf<SVGElement>

getElementsByTagNameNS(string | null, string)

function getElementsByTagNameNS(namespace: string | null, localName: string): HTMLCollectionOf<Element>

Parameters

namespace

string | null

localName

string

Returns

HTMLCollectionOf<Element>

getSelection()

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

function getSelection(): Selection | null

Returns

Selection | null

hasFocus()

The hasFocus() method of the Document interface returns a boolean value indicating whether the document or any element inside the document has focus.

MDN Reference

function hasFocus(): boolean

Returns

boolean

hasStorageAccess()

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

function hasStorageAccess(): Promise<boolean>

Returns

Promise<boolean>

importNode<T>(T, boolean | ImportNodeOptions)

The Document object's importNode() method creates a copy of a inserted into the current document later.

MDN Reference

function importNode<T>(node: T, options?: boolean | ImportNodeOptions): T

Parameters

node

T

options

boolean | ImportNodeOptions

Returns

T

open(string | URL, string, string)

function open(url: string | URL, name: string, features: string): Window | null

Parameters

url

string | URL

name

string

features

string

Returns

Window | null

open(string, string)

The Document.open() method opens a document for This does come with some side effects.

MDN Reference

function open(unused1?: string, unused2?: string): Document

Parameters

unused1

string

unused2

string

Returns

queryCommandEnabled(string)

Warning

This API is now deprecated.

MDN Reference

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

function queryCommandEnabled(commandId: string): boolean

Parameters

commandId

string

Returns

boolean

queryCommandIndeterm(string)

Warning

This API is now deprecated.

function queryCommandIndeterm(commandId: string): boolean

Parameters

commandId

string

Returns

boolean

queryCommandState(string)

Warning

This API is now deprecated.

MDN Reference

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

function queryCommandState(commandId: string): boolean

Parameters

commandId

string

Returns

boolean

queryCommandSupported(string)

Warning

This API is now deprecated.

MDN Reference

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

function queryCommandSupported(commandId: string): boolean

Parameters

commandId

string

Returns

boolean

queryCommandValue(string)

Warning

This API is now deprecated.

function queryCommandValue(commandId: string): string

Parameters

commandId

string

Returns

string

releaseEvents()

Warning

This API is now deprecated.

function releaseEvents()

removeEventListener(string, EventListenerOrEventListenerObject, boolean | EventListenerOptions)

function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions)

Parameters

type

string

listener

EventListenerOrEventListenerObject

options

boolean | EventListenerOptions

removeEventListener<K>(K, (this: Document, ev: DocumentEventMap[K]) => any, boolean | EventListenerOptions)

The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

MDN Reference

function removeEventListener<K>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions)

Parameters

type

K

listener

(this: Document, ev: DocumentEventMap[K]) => any

options

boolean | EventListenerOptions

requestStorageAccess()

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.

MDN Reference

function requestStorageAccess(): Promise<void>

Returns

Promise<void>

startViewTransition(ViewTransitionUpdateCallback | StartViewTransitionOptions)

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

function startViewTransition(callbackOptions?: ViewTransitionUpdateCallback | StartViewTransitionOptions): ViewTransition

Parameters

callbackOptions

ViewTransitionUpdateCallback | StartViewTransitionOptions

Returns

ViewTransition

write(string[])

Warning

This API is now deprecated.

MDN Reference

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

function write(text: string[])

Parameters

text

string[]

writeln(string[])

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.

MDN Reference

function writeln(text: string[])

Parameters

text

string[]

Inherited Method Details

append((string | Node)[])

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

function append(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.append

appendChild<T>(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

function appendChild<T>(node: T): T

Parameters

node

T

Returns

T

Inherited From Node.appendChild

cloneNode(boolean)

The cloneNode() method of the Node interface returns a duplicate of the node on which this method was called.

MDN Reference

function cloneNode(subtree?: boolean): Node

Parameters

subtree

boolean

Returns

Node

Inherited From Node.cloneNode

compareDocumentPosition(Node)

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

function compareDocumentPosition(other: Node): number

Parameters

other

Node

Returns

number

Inherited From Node.compareDocumentPosition

contains(Node | null)

The contains() method of the Node interface returns a boolean value indicating whether a node is a descendant of a given node, that is the node itself, one of its direct children (Node.childNodes), one of the children's direct children, and so on.

MDN Reference

function contains(other: Node | null): boolean

Parameters

other

Node | null

Returns

boolean

Inherited From Node.contains

createExpression(string, XPathNSResolver | null)

MDN Reference

function createExpression(expression: string, resolver?: XPathNSResolver | null): XPathExpression

Parameters

expression

string

resolver

XPathNSResolver | null

Returns

XPathExpression

Inherited From XPathEvaluatorBase.createExpression

createNSResolver(Node)

Warning

This API is now deprecated.

MDN Reference

function createNSResolver(nodeResolver: Node): Node

Parameters

nodeResolver

Node

Returns

Node

Inherited From XPathEvaluatorBase.createNSResolver

dispatchEvent(Event)

The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

MDN Reference

function dispatchEvent(event: Event): boolean

Parameters

event

Event

Returns

boolean

Inherited From Node.dispatchEvent

elementFromPoint(number, number)

function elementFromPoint(x: number, y: number): Element | null

Parameters

x

number

y

number

Returns

Element | null

Inherited From DocumentOrShadowRoot.elementFromPoint

elementsFromPoint(number, number)

function elementsFromPoint(x: number, y: number): Element[]

Parameters

x

number

y

number

Returns

Element[]

Inherited From DocumentOrShadowRoot.elementsFromPoint

evaluate(string, Node, XPathNSResolver | null, number, XPathResult | null)

MDN Reference

function evaluate(expression: string, contextNode: Node, resolver?: XPathNSResolver | null, type?: number, result?: XPathResult | null): XPathResult

Parameters

expression

string

contextNode

Node

resolver

XPathNSResolver | null

type

number

result

XPathResult | null

Returns

XPathResult

Inherited From XPathEvaluatorBase.evaluate

getAnimations()

MDN Reference

function getAnimations(): Animation[]

Returns

Animation[]

Inherited From DocumentOrShadowRoot.getAnimations

getRootNode(GetRootNodeOptions)

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

function getRootNode(options?: GetRootNodeOptions): Node

Parameters

options

GetRootNodeOptions

Returns

Node

Inherited From Node.getRootNode

hasChildNodes()

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

MDN Reference

function hasChildNodes(): boolean

Returns

boolean

Inherited From Node.hasChildNodes

insertBefore<T>(T, Node | null)

The insertBefore() method of the Node interface inserts a node before a reference node as a child of a specified parent node.

MDN Reference

function insertBefore<T>(node: T, child: Node | null): T

Parameters

node

T

child

Node | null

Returns

T

Inherited From Node.insertBefore

isDefaultNamespace(string | null)

The isDefaultNamespace() method of the Node interface accepts a namespace URI as an argument.

MDN Reference

function isDefaultNamespace(namespace: string | null): boolean

Parameters

namespace

string | null

Returns

boolean

Inherited From Node.isDefaultNamespace

isEqualNode(Node | null)

The isEqualNode() method of the Node interface tests whether two nodes are equal.

MDN Reference

function isEqualNode(otherNode: Node | null): boolean

Parameters

otherNode

Node | null

Returns

boolean

Inherited From Node.isEqualNode

isSameNode(Node | null)

The isSameNode() method of the Node interface is a legacy alias the for the === strict equality operator.

MDN Reference

function isSameNode(otherNode: Node | null): boolean

Parameters

otherNode

Node | null

Returns

boolean

Inherited From Node.isSameNode

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

MDN Reference

function lookupNamespaceURI(prefix: string | null): string | null

Parameters

prefix

string | null

Returns

string | null

Inherited From Node.lookupNamespaceURI

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

MDN Reference

function lookupPrefix(namespace: string | null): string | null

Parameters

namespace

string | null

Returns

string | null

Inherited From Node.lookupPrefix

normalize()

The normalize() method of the Node interface puts the specified node and all of its sub-tree into a normalized form.

MDN Reference

function normalize()

Inherited From Node.normalize

prepend((string | Node)[])

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

function prepend(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.prepend

querySelector<E>(string)

function querySelector<E>(selectors: string): E | null

Parameters

selectors

string

Returns

E | null

Inherited From ParentNode.querySelector

querySelector<K>(K)

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

MDN Reference

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

Parameters

selectors

K

Returns

HTMLElementTagNameMap[K] | null

Inherited From ParentNode.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): SVGElementTagNameMap[K] | null

Parameters

selectors

K

Returns

SVGElementTagNameMap[K] | null

Inherited From ParentNode.querySelector

querySelector<K>(K)

function querySelector<K>(selectors: K): MathMLElementTagNameMap[K] | null

Parameters

selectors

K

Returns

MathMLElementTagNameMap[K] | null

Inherited From ParentNode.querySelector

querySelector<K>(K)

Warning

This API is now deprecated.

function querySelector<K>(selectors: K): HTMLElementDeprecatedTagNameMap[K] | null

Parameters

selectors

K

Returns

HTMLElementDeprecatedTagNameMap[K] | null

Inherited From ParentNode.querySelector

querySelectorAll<E>(string)

function querySelectorAll<E>(selectors: string): NodeListOf<E>

Parameters

selectors

string

Returns

NodeListOf<E>

Inherited From ParentNode.querySelectorAll

querySelectorAll<K>(K)

Returns all element descendants of node that match selectors.

MDN Reference

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

Parameters

selectors

K

Returns

NodeListOf<HTMLElementTagNameMap[K]>

Inherited From ParentNode.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<SVGElementTagNameMap[K]>

Inherited From ParentNode.querySelectorAll

querySelectorAll<K>(K)

function querySelectorAll<K>(selectors: K): NodeListOf<MathMLElementTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<MathMLElementTagNameMap[K]>

Inherited From ParentNode.querySelectorAll

querySelectorAll<K>(K)

Warning

This API is now deprecated.

function querySelectorAll<K>(selectors: K): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Parameters

selectors

K

Returns

NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Inherited From ParentNode.querySelectorAll

removeChild<T>(T)

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

MDN Reference

function removeChild<T>(child: T): T

Parameters

child

T

Returns

T

Inherited From Node.removeChild

replaceChild<T>(Node, T)

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

MDN Reference

function replaceChild<T>(node: Node, child: T): T

Parameters

node

Node

child

T

Returns

T

Inherited From Node.replaceChild

replaceChildren((string | Node)[])

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

function replaceChildren(nodes: (string | Node)[])

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.replaceChildren