Document interface

Any web page loaded in the browser and serves as an entry point into the web page's content, which is the DOM tree.

Extends

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

Properties

alinkColor

Sets or gets the color of all active links in the document.

all

Returns a reference to the collection of elements contained by the object.

anchors

Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.

applets

Retrieves a collection of all applet objects in the document.

bgColor

Deprecated. Sets or retrieves a value that indicates the background color behind the object.

body

Specifies the beginning and end of the document body.

characterSet

Returns document's encoding.

charset

Gets or sets the character set used to encode the object.

compatMode

Gets a value that indicates whether standards-compliant mode is switched on for the object.

contentType

Returns document's content type.

cookie

Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.

Can be set, to add a new cookie to the element's set of HTTP cookies.

If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.

currentScript

Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.

Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.

defaultView

Returns the Window object of the active document.

designMode

Sets or gets a value that indicates whether the document can be edited.

dir

Sets or retrieves a value that indicates the reading order of the object.

doctype

Gets an object representing the document type declaration associated with the current document.

documentElement

Gets a reference to the root node of the document.

documentURI

Returns document's URL.

domain

Sets or gets the security domain of the document.

embeds

Retrieves a collection of all embed objects in the document.

fgColor

Sets or gets the foreground (text) color of the document.

forms

Retrieves a collection, in source order, of all form objects in the document.

fullscreen
fullscreenEnabled

Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.

head

Returns the head element.

hidden
images

Retrieves a collection, in source order, of img objects in the document.

implementation

Gets the implementation object of the current document.

inputEncoding

Returns the character encoding used to create the webpage that is loaded into the document object.

lastModified

Gets the date that the page was last modified, if the page supplies one.

linkColor

Sets or gets the color of the document links.

links

Retrieves a collection of all a objects that specify the href property and all area objects in the document.

location

Contains information about the current URL.

mozCancelFullScreen
msExitFullscreen
onfullscreenchange
onfullscreenerror
onpointerlockchange
onpointerlockerror
onreadystatechange

Fires when the state of the object has changed.

onvisibilitychange
ownerDocument
pictureInPictureEnabled
plugins

Return an HTMLCollection of the embed elements in the Document.

readyState

Retrieves a value that indicates the current state of the object.

referrer

Gets the URL of the location that referred the user to the current page.

rootElement
scripts

Retrieves a collection of all script objects in the document.

scrollingElement
timeline
title

Contains the title of the document.

URL

Sets or gets the URL for the current document.

visibilityState
vlinkColor

Sets or gets the color of the links that the user has visited.

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.

adoptedStyleSheets
ATTRIBUTE_NODE
baseURI

Returns node's node document's document base URL.

CDATA_SECTION_NODE

node is a CDATASection node.

childElementCount
childNodes

Returns the children.

children

Returns the child elements.

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

Returns the first child.

firstElementChild

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

fonts
fullscreenElement

Returns document's fullscreen element.

isConnected

Returns true if node is connected and false otherwise.

lastChild

Returns the last child.

lastElementChild

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

nextSibling

Returns the next sibling.

nodeName

Returns a string appropriate for the type of node.

nodeType

Returns the type of node.

nodeValue
NOTATION_NODE
onabort

Fires when the user aborts the download.

onanimationcancel
onanimationend
onanimationiteration
onanimationstart
onauxclick
onbeforeinput
onblur

Fires when the object loses the input focus.

oncancel
oncanplay

Occurs when playback is possible, but would require further buffering.

oncanplaythrough
onchange

Fires when the contents of the object or selection have changed.

onclick

Fires when the user clicks the left mouse button on the object

onclose
oncontextmenu

Fires when the user clicks the right mouse button in the client area, opening the context menu.

oncopy
oncuechange
oncut
ondblclick

Fires when the user double-clicks the object.

ondrag

Fires on the source object continuously during a drag operation.

ondragend

Fires on the source object when the user releases the mouse at the close of a drag operation.

ondragenter

Fires on the target element when the user drags the object to a valid drop target.

ondragleave

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

ondragover

Fires on the target element continuously while the user drags the object over a valid drop target.

ondragstart

Fires on the source object when the user starts to drag a text selection or selected object.

ondrop
ondurationchange

Occurs when the duration attribute is updated.

onemptied

Occurs when the media element is reset to its initial state.

onended

Occurs when the end of playback is reached.

onerror

Fires when an error occurs during object loading.

onfocus

Fires when the object receives focus.

onformdata
ongotpointercapture
oninput
oninvalid
onkeydown

Fires when the user presses a key.

onkeypress

Fires when the user presses an alphanumeric key.

onkeyup

Fires when the user releases a key.

onload

Fires immediately after the browser loads the object.

onloadeddata

Occurs when media data is loaded at the current playback position.

onloadedmetadata

Occurs when the duration and dimensions of the media have been determined.

onloadstart

Occurs when Internet Explorer begins looking for media data.

onlostpointercapture
onmousedown

Fires when the user clicks the object with either mouse button.

onmouseenter
onmouseleave
onmousemove

Fires when the user moves the mouse over the object.

onmouseout

Fires when the user moves the mouse pointer outside the boundaries of the object.

onmouseover

Fires when the user moves the mouse pointer into the object.

onmouseup

Fires when the user releases a mouse button while the mouse is over the object.

onpaste
onpause

Occurs when playback is paused.

onplay

Occurs when the play method is requested.

onplaying

Occurs when the audio or video has started playing.

onpointercancel
onpointerdown
onpointerenter
onpointerleave
onpointermove
onpointerout
onpointerover
onpointerup
onprogress

Occurs to indicate progress while downloading media data.

onratechange

Occurs when the playback rate is increased or decreased.

onreset

Fires when the user resets a form.

onresize
onscroll

Fires when the user repositions the scroll box in the scroll bar on the object.

onsecuritypolicyviolation
onseeked

Occurs when the seek operation ends.

onseeking

Occurs when the current playback position is moved.

onselect

Fires when the current selection changes.

onselectionchange
onselectstart
onslotchange
onstalled

Occurs when the download has stopped.

onsubmit
onsuspend

Occurs if the load operation has been intentionally halted.

ontimeupdate

Occurs to indicate the current playback position.

ontoggle
ontouchcancel
ontouchend
ontouchmove
ontouchstart
ontransitioncancel
ontransitionend
ontransitionrun
ontransitionstart
onvolumechange

Occurs when the volume is changed, or playback is muted or unmuted.

onwaiting

Occurs when playback stops because the next frame of a video resource is not available.

onwebkitanimationend
onwebkitanimationiteration
onwebkitanimationstart
onwebkittransitionend
onwheel
parentElement

Returns the parent element.

parentNode

Returns the parent.

pictureInPictureElement
pointerLockElement
previousSibling

Returns the previous sibling.

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

styleSheets

Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.

textContent
TEXT_NODE

node is a Text node.

Methods

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

Moves node from another document and returns it.

If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException.

captureEvents()
caretRangeFromPoint(number, number)
clear()
close()

Closes an output stream and forces the sent data to display.

createAttribute(string)

Creates an attribute object with a specified name.

createAttributeNS(null | string, string)
createCDATASection(string)

Returns a CDATASection node whose data is data.

createComment(string)

Creates a comment object with the specified data.

createDocumentFragment()

Creates a new document.

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

Creates an instance of the element for the specified tag.

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

Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.

If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.

If one of the following conditions is true a "NamespaceError" DOMException will be thrown:

localName does not match the QName production. Namespace prefix is not null and namespace is the empty string. Namespace prefix is "xml" and namespace is not the XML namespace. qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace. namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".

When supplied, options's is can be used to create a customized built-in element.

createElementNS("http://www.w3.org/2000/svg", string)
createElementNS(null | string, string, ElementCreationOptions)
createElementNS(null | string, string, string | ElementCreationOptions)
createElementNS<K>("http://www.w3.org/2000/svg", K)
createEvent("AnimationEvent")
createEvent("AnimationPlaybackEvent")
createEvent("AudioProcessingEvent")
createEvent("BeforeUnloadEvent")
createEvent("BlobEvent")
createEvent("ClipboardEvent")
createEvent("CloseEvent")
createEvent("CompositionEvent")
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("MouseEvent")
createEvent("MouseEvents")
createEvent("MutationEvent")
createEvent("MutationEvents")
createEvent("OfflineAudioCompletionEvent")
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("TouchEvent")
createEvent("TrackEvent")
createEvent("TransitionEvent")
createEvent("UIEvent")
createEvent("UIEvents")
createEvent("WebGLContextEvent")
createEvent("WheelEvent")
createEvent(string)
createNodeIterator(Node, number, null | NodeFilter)

Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.

createProcessingInstruction(string, string)

Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.

createRange()

Returns an empty range object that has both of its boundary points positioned at the beginning of the document.

createTextNode(string)

Creates a text string from the specified value.

createTreeWalker(Node, number, null | NodeFilter)

Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.

execCommand(string, boolean, string)

Executes a command on the current document, current selection, or the given range.

exitFullscreen()

Stops document's fullscreen element from being displayed fullscreen and resolves promise when done.

exitPictureInPicture()
exitPointerLock()
getElementById(string)

Returns a reference to the first object with the specified value of the ID attribute.

getElementsByClassName(string)

Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.

getElementsByName(string)

Gets a collection of objects based on the value of the NAME or ID attribute.

getElementsByTagName(string)
getElementsByTagName<K>(K)

Retrieves a collection of objects based on the specified element name.

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

If namespace and localName are "*" returns a HTMLCollection of all descendant elements.

If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.

If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.

Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.

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

Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.

hasFocus()

Gets a value indicating whether the object currently has focus.

hasStorageAccess()
importNode<T>(T, boolean)

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

If node is a document or a shadow root, throws a "NotSupportedError" DOMException.

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

Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.

queryCommandEnabled(string)

Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.

queryCommandIndeterm(string)

Returns a Boolean value that indicates whether the specified command is in the indeterminate state.

queryCommandState(string)

Returns a Boolean value that indicates the current state of the command.

queryCommandSupported(string)

Returns a Boolean value that indicates whether the current command is supported on the current range.

queryCommandValue(string)

Returns the current value of the document, range, or current selection for the given command.

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

Writes one or more HTML expressions to a document in the specified window.

writeln(string[])

Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.

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.

appendChild<T>(T)
cloneNode(boolean)

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

compareDocumentPosition(Node)

Returns a bitmask indicating the position of other relative to node.

contains(null | Node)

Returns true if other is an inclusive descendant of node, and false otherwise.

createExpression(string, null | XPathNSResolver)
createNSResolver(Node)
dispatchEvent(Event)

Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

elementFromPoint(number, number)

Returns the element for the specified x coordinate and the specified y coordinate.

elementsFromPoint(number, number)
evaluate(string, Node, null | XPathNSResolver, number, null | XPathResult)
getAnimations()
getRootNode(GetRootNodeOptions)

Returns node's root.

hasChildNodes()

Returns whether node has children.

insertBefore<T>(T, null | Node)
isDefaultNamespace(null | string)
isEqualNode(null | Node)

Returns whether node and otherNode have the same properties.

isSameNode(null | Node)
lookupNamespaceURI(null | string)
lookupPrefix(null | string)
normalize()

Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

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.

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

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

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

Returns all element descendants of node that match selectors.

querySelectorAll<K>(K)
removeChild<T>(T)
replaceChild<T>(Node, T)
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.

Property Details

alinkColor

Warning

This API is now deprecated.

Sets or gets the color of all active links in the document.

alinkColor: string

Property Value

string

all

Warning

This API is now deprecated.

Returns a reference to the collection of elements contained by the object.

all: HTMLAllCollection

Property Value

HTMLAllCollection

anchors

Warning

This API is now deprecated.

Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.

anchors: HTMLCollectionOf<HTMLAnchorElement>

Property Value

HTMLCollectionOf<HTMLAnchorElement>

applets

Warning

This API is now deprecated.

Retrieves a collection of all applet objects in the document.

applets: HTMLCollection

Property Value

HTMLCollection

bgColor

Warning

This API is now deprecated.

Deprecated. Sets or retrieves a value that indicates the background color behind the object.

bgColor: string

Property Value

string

body

Specifies the beginning and end of the document body.

body: HTMLElement

Property Value

HTMLElement

characterSet

Returns document's encoding.

characterSet: string

Property Value

string

charset

Warning

This API is now deprecated.

This is a legacy alias of characterSet.

Gets or sets the character set used to encode the object.

charset: string

Property Value

string

compatMode

Gets a value that indicates whether standards-compliant mode is switched on for the object.

compatMode: string

Property Value

string

contentType

Returns document's content type.

contentType: string

Property Value

string

Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.

Can be set, to add a new cookie to the element's set of HTTP cookies.

If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.

cookie: string

Property Value

string

currentScript

Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.

Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.

currentScript: null | HTMLOrSVGScriptElement

Property Value

null | HTMLOrSVGScriptElement

defaultView

Returns the Window object of the active document.

defaultView: null | (Window & typeof globalThis)

Property Value

null | (Window & typeof globalThis)

designMode

Sets or gets a value that indicates whether the document can be edited.

designMode: string

Property Value

string

dir

Sets or retrieves a value that indicates the reading order of the object.

dir: string

Property Value

string

doctype

Gets an object representing the document type declaration associated with the current document.

doctype: null | DocumentType

Property Value

null | DocumentType

documentElement

Gets a reference to the root node of the document.

documentElement: HTMLElement

Property Value

HTMLElement

documentURI

Returns document's URL.

documentURI: string

Property Value

string

domain

Warning

This API is now deprecated.

Sets or gets the security domain of the document.

domain: string

Property Value

string

embeds

Retrieves a collection of all embed objects in the document.

embeds: HTMLCollectionOf<HTMLEmbedElement>

Property Value

HTMLCollectionOf<HTMLEmbedElement>

fgColor

Warning

This API is now deprecated.

Sets or gets the foreground (text) color of the document.

fgColor: string

Property Value

string

forms

Retrieves a collection, in source order, of all form objects in the document.

forms: HTMLCollectionOf<HTMLFormElement>

Property Value

HTMLCollectionOf<HTMLFormElement>

fullscreen

Warning

This API is now deprecated.

fullscreen: boolean

Property Value

boolean

fullscreenEnabled

Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.

fullscreenEnabled: boolean

Property Value

boolean

head

Returns the head element.

head: HTMLHeadElement

Property Value

HTMLHeadElement

hidden

hidden: boolean

Property Value

boolean

images

Retrieves a collection, in source order, of img objects in the document.

images: HTMLCollectionOf<HTMLImageElement>

Property Value

HTMLCollectionOf<HTMLImageElement>

implementation

Gets the implementation object of the current document.

implementation: DOMImplementation

Property Value

DOMImplementation

inputEncoding

Warning

This API is now deprecated.

This is a legacy alias of characterSet.

Returns the character encoding used to create the webpage that is loaded into the document object.

inputEncoding: string

Property Value

string

lastModified

Gets the date that the page was last modified, if the page supplies one.

lastModified: string

Property Value

string

linkColor

Warning

This API is now deprecated.

Sets or gets the color of the document links.

linkColor: string

Property Value

string

Retrieves a collection of all a objects that specify the href property and all area objects in the document.

links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

Property Value

HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

location

Contains information about the current URL.

Location location

Property Value

Location

mozCancelFullScreen

mozCancelFullScreen: any

Property Value

any

msExitFullscreen

msExitFullscreen: any

Property Value

any

onfullscreenchange

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

Property Value

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

onfullscreenerror

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

Property Value

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

onpointerlockchange

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

Property Value

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

onpointerlockerror

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

Property Value

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

onreadystatechange

Fires when the state of the object has changed.

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

Property Value

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

onvisibilitychange

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

Property Value

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

ownerDocument

ownerDocument: null

Property Value

null

pictureInPictureEnabled

pictureInPictureEnabled: boolean

Property Value

boolean

plugins

Return an HTMLCollection of the embed elements in the Document.

plugins: HTMLCollectionOf<HTMLEmbedElement>

Property Value

HTMLCollectionOf<HTMLEmbedElement>

readyState

Retrieves a value that indicates the current state of the object.

readyState: DocumentReadyState

Property Value

DocumentReadyState

referrer

Gets the URL of the location that referred the user to the current page.

referrer: string

Property Value

string

rootElement

Warning

This API is now deprecated.

rootElement: null | SVGSVGElement

Property Value

null | SVGSVGElement

scripts

Retrieves a collection of all script objects in the document.

scripts: HTMLCollectionOf<HTMLScriptElement>

Property Value

HTMLCollectionOf<HTMLScriptElement>

scrollingElement

scrollingElement: null | Element

Property Value

null | Element

timeline

timeline: DocumentTimeline

Property Value

DocumentTimeline

title

Contains the title of the document.

title: string

Property Value

string

URL

Sets or gets the URL for the current document.

URL: string

Property Value

string

visibilityState

visibilityState: DocumentVisibilityState

Property Value

DocumentVisibilityState

vlinkColor

Warning

This API is now deprecated.

Sets or gets the color of the links that the user has visited.

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.

activeElement: null | Element

Property Value

null | Element

Inherited From DocumentOrShadowRoot.activeElement

adoptedStyleSheets

adoptedStyleSheets: CSSStyleSheet[]

Property Value

CSSStyleSheet[]

Inherited From DocumentOrShadowRoot.adoptedStyleSheets

ATTRIBUTE_NODE

ATTRIBUTE_NODE: number

Property Value

number

Inherited From Node.ATTRIBUTE_NODE

baseURI

Returns node's node document's document base URL.

baseURI: string

Property Value

string

Inherited From Node.baseURI

CDATA_SECTION_NODE

node is a CDATASection node.

CDATA_SECTION_NODE: number

Property Value

number

Inherited From Node.CDATA_SECTION_NODE

childElementCount

childElementCount: number

Property Value

number

Inherited From ParentNode.childElementCount

childNodes

Returns the children.

childNodes: NodeListOf<ChildNode>

Property Value

NodeListOf<ChildNode>

Inherited From Node.childNodes

children

Returns the child elements.

children: HTMLCollection

Property Value

HTMLCollection

Inherited From ParentNode.children

COMMENT_NODE

node is a Comment node.

COMMENT_NODE: number

Property Value

number

Inherited From Node.COMMENT_NODE

DOCUMENT_FRAGMENT_NODE

node is a DocumentFragment node.

DOCUMENT_FRAGMENT_NODE: number

Property Value

number

Inherited From Node.DOCUMENT_FRAGMENT_NODE

DOCUMENT_NODE

node is a document.

DOCUMENT_NODE: number

Property Value

number

Inherited From Node.DOCUMENT_NODE

DOCUMENT_POSITION_CONTAINED_BY

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINED_BY: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_CONTAINS

Set when other is an ancestor of node.

DOCUMENT_POSITION_CONTAINS: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_DISCONNECTED

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

DOCUMENT_POSITION_DISCONNECTED: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_FOLLOWING

Set when other is following node.

DOCUMENT_POSITION_FOLLOWING: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

DOCUMENT_POSITION_PRECEDING

Set when other is preceding node.

DOCUMENT_POSITION_PRECEDING: number

Property Value

number

Inherited From Node.DOCUMENT_POSITION_PRECEDING

DOCUMENT_TYPE_NODE

node is a doctype.

DOCUMENT_TYPE_NODE: number

Property Value

number

Inherited From Node.DOCUMENT_TYPE_NODE

ELEMENT_NODE

node is an element.

ELEMENT_NODE: number

Property Value

number

Inherited From Node.ELEMENT_NODE

ENTITY_NODE

ENTITY_NODE: number

Property Value

number

Inherited From Node.ENTITY_NODE

ENTITY_REFERENCE_NODE

ENTITY_REFERENCE_NODE: number

Property Value

number

Inherited From Node.ENTITY_REFERENCE_NODE

firstChild

Returns the first child.

firstChild: null | ChildNode

Property Value

null | ChildNode

Inherited From Node.firstChild

firstElementChild

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

firstElementChild: null | Element

Property Value

null | Element

Inherited From ParentNode.firstElementChild

fonts

fonts: FontFaceSet

Property Value

FontFaceSet

Inherited From FontFaceSource.fonts

fullscreenElement

Returns document's fullscreen element.

fullscreenElement: null | Element

Property Value

null | Element

Inherited From DocumentOrShadowRoot.fullscreenElement

isConnected

Returns true if node is connected and false otherwise.

isConnected: boolean

Property Value

boolean

Inherited From Node.isConnected

lastChild

Returns the last child.

lastChild: null | ChildNode

Property Value

null | ChildNode

Inherited From Node.lastChild

lastElementChild

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

lastElementChild: null | Element

Property Value

null | Element

Inherited From ParentNode.lastElementChild

nextSibling

Returns the next sibling.

nextSibling: null | ChildNode

Property Value

null | ChildNode

Inherited From Node.nextSibling

nodeName

Returns a string appropriate for the type of node.

nodeName: string

Property Value

string

Inherited From Node.nodeName

nodeType

Returns the type of node.

nodeType: number

Property Value

number

Inherited From Node.nodeType

nodeValue

nodeValue: null | string

Property Value

null | string

Inherited From Node.nodeValue

NOTATION_NODE

NOTATION_NODE: number

Property Value

number

Inherited From Node.NOTATION_NODE

onabort

Fires when the user aborts the download.

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

Property Value

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

Inherited From GlobalEventHandlers.onabort

onanimationcancel

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

Property Value

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

Inherited From GlobalEventHandlers.onanimationcancel

onanimationend

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

Property Value

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

Inherited From GlobalEventHandlers.onanimationend

onanimationiteration

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

Property Value

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

Inherited From GlobalEventHandlers.onanimationiteration

onanimationstart

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

Property Value

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

Inherited From GlobalEventHandlers.onanimationstart

onauxclick

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

Property Value

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

Inherited From GlobalEventHandlers.onauxclick

onbeforeinput

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

Property Value

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

Inherited From GlobalEventHandlers.onbeforeinput

onblur

Fires when the object loses the input focus.

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

Property Value

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

Inherited From GlobalEventHandlers.onblur

oncancel

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

Property Value

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

Inherited From GlobalEventHandlers.oncancel

oncanplay

Occurs when playback is possible, but would require further buffering.

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

Property Value

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

Inherited From GlobalEventHandlers.oncanplay

oncanplaythrough

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

Property Value

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

Inherited From GlobalEventHandlers.oncanplaythrough

onchange

Fires when the contents of the object or selection have changed.

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

Property Value

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

Inherited From GlobalEventHandlers.onchange

onclick

Fires when the user clicks the left mouse button on the object

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

Property Value

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

Inherited From GlobalEventHandlers.onclick

onclose

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

Property Value

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

Inherited From GlobalEventHandlers.onclose

oncontextmenu

Fires when the user clicks the right mouse button in the client area, opening the context menu.

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

Property Value

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

Inherited From GlobalEventHandlers.oncontextmenu

oncopy

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

Property Value

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

Inherited From DocumentAndElementEventHandlers.oncopy

oncuechange

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

Property Value

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

Inherited From GlobalEventHandlers.oncuechange

oncut

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

Property Value

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

Inherited From DocumentAndElementEventHandlers.oncut

ondblclick

Fires when the user double-clicks the object.

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

Property Value

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

Inherited From GlobalEventHandlers.ondblclick

ondrag

Fires on the source object continuously during a drag operation.

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

Property Value

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

Inherited From GlobalEventHandlers.ondrag

ondragend

Fires on the source object when the user releases the mouse at the close of a drag operation.

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

Property Value

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

Inherited From GlobalEventHandlers.ondragend

ondragenter

Fires on the target element when the user drags the object to a valid drop target.

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

Property Value

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

Inherited From GlobalEventHandlers.ondragenter

ondragleave

Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

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

Property Value

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

Inherited From GlobalEventHandlers.ondragleave

ondragover

Fires on the target element continuously while the user drags the object over a valid drop target.

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

Property Value

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

Inherited From GlobalEventHandlers.ondragover

ondragstart

Fires on the source object when the user starts to drag a text selection or selected object.

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

Property Value

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

Inherited From GlobalEventHandlers.ondragstart

ondrop

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

Property Value

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

Inherited From GlobalEventHandlers.ondrop

ondurationchange

Occurs when the duration attribute is updated.

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

Property Value

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

Inherited From GlobalEventHandlers.ondurationchange

onemptied

Occurs when the media element is reset to its initial state.

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

Property Value

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

Inherited From GlobalEventHandlers.onemptied

onended

Occurs when the end of playback is reached.

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

Property Value

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

Inherited From GlobalEventHandlers.onended

onerror

Fires when an error occurs during object loading.

onerror: OnErrorEventHandler

Property Value

OnErrorEventHandler

Inherited From GlobalEventHandlers.onerror

onfocus

Fires when the object receives focus.

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

Property Value

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

Inherited From GlobalEventHandlers.onfocus

onformdata

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

Property Value

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

Inherited From GlobalEventHandlers.onformdata

ongotpointercapture

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

Property Value

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

Inherited From GlobalEventHandlers.ongotpointercapture

oninput

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

Property Value

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

Inherited From GlobalEventHandlers.oninput

oninvalid

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

Property Value

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

Inherited From GlobalEventHandlers.oninvalid

onkeydown

Fires when the user presses a key.

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

Property Value

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

Inherited From GlobalEventHandlers.onkeydown

onkeypress

Warning

This API is now deprecated.

Fires when the user presses an alphanumeric key.

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

Property Value

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

Inherited From GlobalEventHandlers.onkeypress

onkeyup

Fires when the user releases a key.

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

Property Value

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

Inherited From GlobalEventHandlers.onkeyup

onload

Fires immediately after the browser loads the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onload

onloadeddata

Occurs when media data is loaded at the current playback position.

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

Property Value

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

Inherited From GlobalEventHandlers.onloadeddata

onloadedmetadata

Occurs when the duration and dimensions of the media have been determined.

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

Property Value

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

Inherited From GlobalEventHandlers.onloadedmetadata

onloadstart

Occurs when Internet Explorer begins looking for media data.

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

Property Value

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

Inherited From GlobalEventHandlers.onloadstart

onlostpointercapture

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

Property Value

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

Inherited From GlobalEventHandlers.onlostpointercapture

onmousedown

Fires when the user clicks the object with either mouse button.

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

Property Value

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

Inherited From GlobalEventHandlers.onmousedown

onmouseenter

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

Property Value

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

Inherited From GlobalEventHandlers.onmouseenter

onmouseleave

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

Property Value

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

Inherited From GlobalEventHandlers.onmouseleave

onmousemove

Fires when the user moves the mouse over the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onmousemove

onmouseout

Fires when the user moves the mouse pointer outside the boundaries of the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onmouseout

onmouseover

Fires when the user moves the mouse pointer into the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onmouseover

onmouseup

Fires when the user releases a mouse button while the mouse is over the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onmouseup

onpaste

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

Property Value

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

Inherited From DocumentAndElementEventHandlers.onpaste

onpause

Occurs when playback is paused.

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

Property Value

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

Inherited From GlobalEventHandlers.onpause

onplay

Occurs when the play method is requested.

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

Property Value

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

Inherited From GlobalEventHandlers.onplay

onplaying

Occurs when the audio or video has started playing.

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

Property Value

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

Inherited From GlobalEventHandlers.onplaying

onpointercancel

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

Property Value

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

Inherited From GlobalEventHandlers.onpointercancel

onpointerdown

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerdown

onpointerenter

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerenter

onpointerleave

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerleave

onpointermove

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

Property Value

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

Inherited From GlobalEventHandlers.onpointermove

onpointerout

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerout

onpointerover

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerover

onpointerup

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

Property Value

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

Inherited From GlobalEventHandlers.onpointerup

onprogress

Occurs to indicate progress while downloading media data.

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

Property Value

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

Inherited From GlobalEventHandlers.onprogress

onratechange

Occurs when the playback rate is increased or decreased.

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

Property Value

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

Inherited From GlobalEventHandlers.onratechange

onreset

Fires when the user resets a form.

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

Property Value

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

Inherited From GlobalEventHandlers.onreset

onresize

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

Property Value

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

Inherited From GlobalEventHandlers.onresize

onscroll

Fires when the user repositions the scroll box in the scroll bar on the object.

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

Property Value

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

Inherited From GlobalEventHandlers.onscroll

onsecuritypolicyviolation

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

Property Value

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

Inherited From GlobalEventHandlers.onsecuritypolicyviolation

onseeked

Occurs when the seek operation ends.

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

Property Value

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

Inherited From GlobalEventHandlers.onseeked

onseeking

Occurs when the current playback position is moved.

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

Property Value

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

Inherited From GlobalEventHandlers.onseeking

onselect

Fires when the current selection changes.

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

Property Value

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

Inherited From GlobalEventHandlers.onselect

onselectionchange

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

Property Value

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

Inherited From GlobalEventHandlers.onselectionchange

onselectstart

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

Property Value

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

Inherited From GlobalEventHandlers.onselectstart

onslotchange

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

Property Value

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

Inherited From GlobalEventHandlers.onslotchange

onstalled

Occurs when the download has stopped.

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

Property Value

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

Inherited From GlobalEventHandlers.onstalled

onsubmit

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

Property Value

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

Inherited From GlobalEventHandlers.onsubmit

onsuspend

Occurs if the load operation has been intentionally halted.

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

Property Value

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

Inherited From GlobalEventHandlers.onsuspend

ontimeupdate

Occurs to indicate the current playback position.

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

Property Value

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

Inherited From GlobalEventHandlers.ontimeupdate

ontoggle

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

Property Value

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

Inherited From GlobalEventHandlers.ontoggle

ontouchcancel

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

Property Value

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

Inherited From GlobalEventHandlers.ontouchcancel

ontouchend

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

Property Value

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

Inherited From GlobalEventHandlers.ontouchend

ontouchmove

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

Property Value

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

Inherited From GlobalEventHandlers.ontouchmove

ontouchstart

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

Property Value

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

Inherited From GlobalEventHandlers.ontouchstart

ontransitioncancel

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

Property Value

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

Inherited From GlobalEventHandlers.ontransitioncancel

ontransitionend

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

Property Value

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

Inherited From GlobalEventHandlers.ontransitionend

ontransitionrun

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

Property Value

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

Inherited From GlobalEventHandlers.ontransitionrun

ontransitionstart

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

Property Value

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

Inherited From GlobalEventHandlers.ontransitionstart

onvolumechange

Occurs when the volume is changed, or playback is muted or unmuted.

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

Property Value

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

Inherited From GlobalEventHandlers.onvolumechange

onwaiting

Occurs when playback stops because the next frame of a video resource is not available.

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

Property Value

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

Inherited From GlobalEventHandlers.onwaiting

onwebkitanimationend

Warning

This API is now deprecated.

This is a legacy alias of onanimationend.

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

Property Value

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

Inherited From GlobalEventHandlers.onwebkitanimationend

onwebkitanimationiteration

Warning

This API is now deprecated.

This is a legacy alias of onanimationiteration.

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

Property Value

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

Inherited From GlobalEventHandlers.onwebkitanimationiteration

onwebkitanimationstart

Warning

This API is now deprecated.

This is a legacy alias of onanimationstart.

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

Property Value

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

Inherited From GlobalEventHandlers.onwebkitanimationstart

onwebkittransitionend

Warning

This API is now deprecated.

This is a legacy alias of ontransitionend.

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

Property Value

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

Inherited From GlobalEventHandlers.onwebkittransitionend

onwheel

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

Property Value

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

Inherited From GlobalEventHandlers.onwheel

parentElement

Returns the parent element.

parentElement: null | HTMLElement

Property Value

null | HTMLElement

Inherited From Node.parentElement

parentNode

Returns the parent.

parentNode: null | ParentNode

Property Value

null | ParentNode

Inherited From Node.parentNode

pictureInPictureElement

pictureInPictureElement: null | Element

Property Value

null | Element

Inherited From DocumentOrShadowRoot.pictureInPictureElement

pointerLockElement

pointerLockElement: null | Element

Property Value

null | Element

Inherited From DocumentOrShadowRoot.pointerLockElement

previousSibling

Returns the previous sibling.

previousSibling: null | ChildNode

Property Value

null | ChildNode

Inherited From Node.previousSibling

PROCESSING_INSTRUCTION_NODE

node is a ProcessingInstruction node.

PROCESSING_INSTRUCTION_NODE: number

Property Value

number

Inherited From Node.PROCESSING_INSTRUCTION_NODE

styleSheets

Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.

styleSheets: StyleSheetList

Property Value

StyleSheetList

Inherited From DocumentOrShadowRoot.styleSheets

textContent

textContent: null | string

Property Value

null | string

Inherited From Node.textContent

TEXT_NODE

node is a Text node.

TEXT_NODE: number

Property Value

number

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)

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)

Moves node from another document and returns it.

If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException.

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

Parameters

node

T

Returns

T

captureEvents()

Warning

This API is now deprecated.

function captureEvents()

caretRangeFromPoint(number, number)

Warning

This API is now deprecated.

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

Parameters

x

number

y

number

Returns

null | Range

clear()

Warning

This API is now deprecated.

function clear()

close()

Closes an output stream and forces the sent data to display.

function close()

createAttribute(string)

Creates an attribute object with a specified name.

function createAttribute(localName: string): Attr

Parameters

localName

string

Returns

Attr

createAttributeNS(null | string, string)

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

Parameters

namespace

null | string

qualifiedName

string

Returns

Attr

createCDATASection(string)

Returns a CDATASection node whose data is data.

function createCDATASection(data: string): CDATASection

Parameters

data

string

Returns

CDATASection

createComment(string)

Creates a comment object with the specified data.

function createComment(data: string): Comment

Parameters

data

string

Sets the comment object's data.

Returns

Comment

createDocumentFragment()

Creates a new document.

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)

Creates an instance of the element for the specified tag.

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

Parameters

tagName

K

The name of an element.

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/1999/xhtml", string)

Returns an element with namespace namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.

If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.

If one of the following conditions is true a "NamespaceError" DOMException will be thrown:

localName does not match the QName production. Namespace prefix is not null and namespace is the empty string. Namespace prefix is "xml" and namespace is not the XML namespace. qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace. namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".

When supplied, options's is can be used to create a customized built-in element.

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(null | string, string, ElementCreationOptions)

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

Parameters

namespaceURI

null | string

qualifiedName

string

options

ElementCreationOptions

Returns

Element

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

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

Parameters

namespace

null | string

qualifiedName

string

options

string | ElementCreationOptions

Returns

Element

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

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("CustomEvent")

function createEvent(eventInterface: "CustomEvent"): CustomEvent<any>

Parameters

eventInterface

"CustomEvent"

Returns

CustomEvent<any>

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

Parameters

eventInterface

"MessageEvent"

Returns

MessageEvent<any>

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("MutationEvent")

function createEvent(eventInterface: "MutationEvent"): MutationEvent

Parameters

eventInterface

"MutationEvent"

Returns

MutationEvent

createEvent("MutationEvents")

function createEvent(eventInterface: "MutationEvents"): MutationEvent

Parameters

eventInterface

"MutationEvents"

Returns

MutationEvent

createEvent("OfflineAudioCompletionEvent")

function createEvent(eventInterface: "OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent

Parameters

eventInterface

"OfflineAudioCompletionEvent"

Returns

OfflineAudioCompletionEvent

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

Parameters

eventInterface

"ProgressEvent"

Returns

ProgressEvent<EventTarget>

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("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, null | NodeFilter)

Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.

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

Parameters

root

Node

The root element or node to start traversing on.

whatToShow

number

The type of nodes or elements to appear in the node list

filter

null | NodeFilter

A custom NodeFilter function to use. For more information, see filter. Use null for no filter.

Returns

NodeIterator

createProcessingInstruction(string, string)

Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.

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

Parameters

target

string

data

string

Returns

ProcessingInstruction

createRange()

Returns an empty range object that has both of its boundary points positioned at the beginning of the document.

function createRange(): Range

Returns

Range

createTextNode(string)

Creates a text string from the specified value.

function createTextNode(data: string): Text

Parameters

data

string

String that specifies the nodeValue property of the text node.

Returns

Text

createTreeWalker(Node, number, null | NodeFilter)

Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.

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

Parameters

root

Node

The root element or node to start traversing on.

whatToShow

number

The type of nodes or elements to appear in the node list. For more information, see whatToShow.

filter

null | NodeFilter

A custom NodeFilter function to use.

Returns

TreeWalker

execCommand(string, boolean, string)

Warning

This API is now deprecated.

Executes a command on the current document, current selection, or the given range.

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

Parameters

commandId

string

String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.

showUI

boolean

Display the user interface, defaults to false.

value

string

Value to assign.

Returns

boolean

exitFullscreen()

Stops document's fullscreen element from being displayed fullscreen and resolves promise when done.

function exitFullscreen(): Promise<void>

Returns

Promise<void>

exitPictureInPicture()

function exitPictureInPicture(): Promise<void>

Returns

Promise<void>

exitPointerLock()

function exitPointerLock()

getElementById(string)

Returns a reference to the first object with the specified value of the ID attribute.

function getElementById(elementId: string): null | HTMLElement

Parameters

elementId

string

String that specifies the ID value.

Returns

null | HTMLElement

getElementsByClassName(string)

Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.

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

Parameters

classNames

string

Returns

HTMLCollectionOf<Element>

getElementsByName(string)

Gets a collection of objects based on the value of the NAME or ID attribute.

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

Parameters

elementName

string

Gets a collection of objects based on the value of the NAME or ID attribute.

Returns

NodeListOf<HTMLElement>

getElementsByTagName(string)

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

Parameters

qualifiedName

string

Returns

HTMLCollectionOf<Element>

getElementsByTagName<K>(K)

Retrieves a collection of objects based on the specified element name.

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

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

If namespace and localName are "*" returns a HTMLCollection of all descendant elements.

If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.

If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.

Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.

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(null | string, string)

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

Parameters

namespace

null | string

localName

string

Returns

HTMLCollectionOf<Element>

getSelection()

Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.

function getSelection(): null | Selection

Returns

null | Selection

hasFocus()

Gets a value indicating whether the object currently has focus.

function hasFocus(): boolean

Returns

boolean

hasStorageAccess()

function hasStorageAccess(): Promise<boolean>

Returns

Promise<boolean>

importNode<T>(T, boolean)

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

If node is a document or a shadow root, throws a "NotSupportedError" DOMException.

function importNode<T>(node: T, deep?: boolean): T

Parameters

node

T

deep

boolean

Returns

T

open(string | URL, string, string)

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

Parameters

url

string | URL

name

string

features

string

Returns

null | Window

open(string, string)

Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.

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

Parameters

unused1

string

unused2

string

Returns

Document

queryCommandEnabled(string)

Warning

This API is now deprecated.

Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.

function queryCommandEnabled(commandId: string): boolean

Parameters

commandId

string

Specifies a command identifier.

Returns

boolean

queryCommandIndeterm(string)

Warning

This API is now deprecated.

Returns a Boolean value that indicates whether the specified command is in the indeterminate state.

function queryCommandIndeterm(commandId: string): boolean

Parameters

commandId

string

String that specifies a command identifier.

Returns

boolean

queryCommandState(string)

Warning

This API is now deprecated.

Returns a Boolean value that indicates the current state of the command.

function queryCommandState(commandId: string): boolean

Parameters

commandId

string

String that specifies a command identifier.

Returns

boolean

queryCommandSupported(string)

Warning

This API is now deprecated.

Returns a Boolean value that indicates whether the current command is supported on the current range.

function queryCommandSupported(commandId: string): boolean

Parameters

commandId

string

Specifies a command identifier.

Returns

boolean

queryCommandValue(string)

Warning

This API is now deprecated.

Returns the current value of the document, range, or current selection for the given command.

function queryCommandValue(commandId: string): string

Parameters

commandId

string

String that specifies a command identifier.

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)

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

function requestStorageAccess(): Promise<void>

Returns

Promise<void>

write(string[])

Writes one or more HTML expressions to a document in the specified window.

function write(text: string[])

Parameters

text

string[]

writeln(string[])

Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.

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.

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

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.append

appendChild<T>(T)

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

Parameters

node

T

Returns

T

Inherited From Node.appendChild

cloneNode(boolean)

Returns a copy of node. If deep is true, the copy also includes the node's descendants.

function cloneNode(deep?: boolean): Node

Parameters

deep

boolean

Returns

Node

Inherited From Node.cloneNode

compareDocumentPosition(Node)

Returns a bitmask indicating the position of other relative to node.

function compareDocumentPosition(other: Node): number

Parameters

other

Node

Returns

number

Inherited From Node.compareDocumentPosition

contains(null | Node)

Returns true if other is an inclusive descendant of node, and false otherwise.

function contains(other: null | Node): boolean

Parameters

other

null | Node

Returns

boolean

Inherited From Node.contains

createExpression(string, null | XPathNSResolver)

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

Parameters

expression

string

resolver

null | XPathNSResolver

Returns

XPathExpression

Inherited From XPathEvaluatorBase.createExpression

createNSResolver(Node)

function createNSResolver(nodeResolver: Node): XPathNSResolver

Parameters

nodeResolver

Node

Returns

XPathNSResolver

Inherited From XPathEvaluatorBase.createNSResolver

dispatchEvent(Event)

Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.

function dispatchEvent(event: Event): boolean

Parameters

event

Event

Returns

boolean

Inherited From Node.dispatchEvent

elementFromPoint(number, number)

Returns the element for the specified x coordinate and the specified y coordinate.

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

Parameters

x

number

The x-offset

y

number

The y-offset

Returns

null | Element

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, null | XPathNSResolver, number, null | XPathResult)

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

Parameters

expression

string

contextNode

Node

resolver

null | XPathNSResolver

type

number

result

null | XPathResult

Returns

XPathResult

Inherited From XPathEvaluatorBase.evaluate

getAnimations()

function getAnimations(): Animation[]

Returns

Animation[]

Inherited From DocumentOrShadowRoot.getAnimations

getRootNode(GetRootNodeOptions)

Returns node's root.

function getRootNode(options?: GetRootNodeOptions): Node

Parameters

options

GetRootNodeOptions

Returns

Node

Inherited From Node.getRootNode

hasChildNodes()

Returns whether node has children.

function hasChildNodes(): boolean

Returns

boolean

Inherited From Node.hasChildNodes

insertBefore<T>(T, null | Node)

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

Parameters

node

T

child

null | Node

Returns

T

Inherited From Node.insertBefore

isDefaultNamespace(null | string)

function isDefaultNamespace(namespace: null | string): boolean

Parameters

namespace

null | string

Returns

boolean

Inherited From Node.isDefaultNamespace

isEqualNode(null | Node)

Returns whether node and otherNode have the same properties.

function isEqualNode(otherNode: null | Node): boolean

Parameters

otherNode

null | Node

Returns

boolean

Inherited From Node.isEqualNode

isSameNode(null | Node)

function isSameNode(otherNode: null | Node): boolean

Parameters

otherNode

null | Node

Returns

boolean

Inherited From Node.isSameNode

lookupNamespaceURI(null | string)

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

Parameters

prefix

null | string

Returns

null | string

Inherited From Node.lookupNamespaceURI

lookupPrefix(null | string)

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

Parameters

namespace

null | string

Returns

null | string

Inherited From Node.lookupPrefix

normalize()

Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.

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.

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

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.prepend

querySelector<E>(string)

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

Parameters

selectors

string

Returns

null | E

Inherited From ParentNode.querySelector

querySelector<K>(K)

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

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

Parameters

selectors

K

Returns

null | HTMLElementTagNameMap[K]

Inherited From ParentNode.querySelector

querySelector<K>(K)

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

Parameters

selectors

K

Returns

null | SVGElementTagNameMap[K]

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.

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

removeChild<T>(T)

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

Parameters

child

T

Returns

T

Inherited From Node.removeChild

replaceChild<T>(Node, T)

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.

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

Parameters

nodes

(string | Node)[]

Inherited From ParentNode.replaceChildren