An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.

Hierarchy

Properties

ATTRIBUTE_NODE CDATA_SECTION_NODE COMMENT_NODE DOCUMENT_FRAGMENT_NODE DOCUMENT_NODE DOCUMENT_POSITION_CONTAINED_BY DOCUMENT_POSITION_CONTAINS DOCUMENT_POSITION_DISCONNECTED DOCUMENT_POSITION_FOLLOWING DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC DOCUMENT_POSITION_PRECEDING DOCUMENT_TYPE_NODE ELEMENT_NODE ENTITY_NODE ENTITY_REFERENCE_NODE NOTATION_NODE PROCESSING_INSTRUCTION_NODE TEXT_NODE URL activeElement adoptedStyleSheets alinkColor all anchors applets baseURI bgColor body characterSet charset childElementCount childNodes children compatMode contentType cookie currentScript defaultView designMode dir doctype documentElement documentURI domain embeds fgColor firstChild firstElementChild fonts forms fullscreen fullscreenElement fullscreenEnabled head hidden images implementation inputEncoding isConnected lastChild lastElementChild lastModified linkColor links nextSibling nodeName nodeType nodeValue onabort onanimationcancel onanimationend onanimationiteration onanimationstart onauxclick onbeforeinput onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncopy oncuechange oncut ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformdata onfullscreenchange onfullscreenerror ongotpointercapture oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onlostpointercapture onmousedown onmouseenter onmouseleave onmousemove onmouseout onmouseover onmouseup onpaste onpause onplay onplaying onpointercancel onpointerdown onpointerenter onpointerleave onpointerlockchange onpointerlockerror onpointermove onpointerout onpointerover onpointerup onprogress onratechange onreadystatechange onreset onresize onscroll onsecuritypolicyviolation onseeked onseeking onselect onselectionchange onselectstart onslotchange onstalled onsubmit onsuspend ontimeupdate ontoggle ontouchcancel? ontouchend? ontouchmove? ontouchstart? ontransitioncancel ontransitionend ontransitionrun ontransitionstart onvisibilitychange onvolumechange onwaiting onwebkitanimationend onwebkitanimationiteration onwebkitanimationstart onwebkittransitionend onwheel ownerDocument parentElement parentNode pictureInPictureElement pictureInPictureEnabled plugins pointerLockElement previousSibling readyState referrer rootElement scripts scrollingElement styleSheets textContent timeline title visibilityState vlinkColor

Accessors

Methods

Properties

ATTRIBUTE_NODE: number
CDATA_SECTION_NODE: number

node is a CDATASection node.

COMMENT_NODE: number

node is a Comment node.

DOCUMENT_FRAGMENT_NODE: number

node is a DocumentFragment node.

DOCUMENT_NODE: number

node is a document.

DOCUMENT_POSITION_CONTAINED_BY: number

Set when other is a descendant of node.

DOCUMENT_POSITION_CONTAINS: number

Set when other is an ancestor of node.

DOCUMENT_POSITION_DISCONNECTED: number

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

DOCUMENT_POSITION_FOLLOWING: number

Set when other is following node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number
DOCUMENT_POSITION_PRECEDING: number

Set when other is preceding node.

DOCUMENT_TYPE_NODE: number

node is a doctype.

ELEMENT_NODE: number

node is an element.

ENTITY_NODE: number
ENTITY_REFERENCE_NODE: number
NOTATION_NODE: number
PROCESSING_INSTRUCTION_NODE: number

node is a ProcessingInstruction node.

TEXT_NODE: number

node is a Text node.

URL: string

Sets or gets the URL for the current document.

activeElement: Element

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: CSSStyleSheet[]
alinkColor: string

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

Deprecated

all: HTMLAllCollection

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

Deprecated

anchors: HTMLCollectionOf<HTMLAnchorElement>

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

Deprecated

Retrieves a collection of all applet objects in the document.

Deprecated

baseURI: string

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

bgColor: string

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

Deprecated

Specifies the beginning and end of the document body.

characterSet: string

Returns document's encoding.

charset: string

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

Deprecated

This is a legacy alias of characterSet.

childElementCount: number
childNodes: NodeListOf<ChildNode>

Returns the children.

children: HTMLCollection

Returns the child elements.

compatMode: string

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

contentType: string

Returns document's content type.

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

currentScript: HTMLOrSVGScriptElement

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: Window & typeof globalThis

Returns the Window object of the active document.

designMode: string

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

dir: string

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

doctype: DocumentType

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

documentElement: HTMLElement

Gets a reference to the root node of the document.

documentURI: string

Returns document's URL.

domain: string

Sets or gets the security domain of the document.

Deprecated

embeds: HTMLCollectionOf<HTMLEmbedElement>

Retrieves a collection of all embed objects in the document.

fgColor: string

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

Deprecated

firstChild: ChildNode

Returns the first child.

firstElementChild: Element

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

fonts: FontFaceSet
forms: HTMLCollectionOf<HTMLFormElement>

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

fullscreen: boolean

Deprecated

fullscreenElement: Element

Returns document's fullscreen element.

fullscreenEnabled: boolean

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

Returns the head element.

hidden: boolean
images: HTMLCollectionOf<HTMLImageElement>

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

implementation: DOMImplementation

Gets the implementation object of the current document.

inputEncoding: string

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

Deprecated

This is a legacy alias of characterSet.

isConnected: boolean

Returns true if node is connected and false otherwise.

lastChild: ChildNode

Returns the last child.

lastElementChild: Element

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

lastModified: string

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

linkColor: string

Sets or gets the color of the document links.

Deprecated

links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

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

nextSibling: ChildNode

Returns the next sibling.

nodeName: string

Returns a string appropriate for the type of node.

nodeType: number

Returns the type of node.

nodeValue: string
onabort: ((this: GlobalEventHandlers, ev: UIEvent) => any)

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

Fires when an error occurs during object loading.

Param

The event.

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

Type declaration

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

Type declaration

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

Type declaration

    • (this: Document, ev: Event): any
    • Parameters

      Returns any

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

Type declaration

    • (this: Document, ev: Event): any
    • Parameters

      Returns any

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

    • (this: Document, ev: Event): any
    • Parameters

      Returns any

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

Type declaration

    • (this: Document, ev: Event): any
    • Parameters

      Returns any

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

    • (this: Document, ev: Event): any
    • Fires when the state of the object has changed.

      Parameters

      Returns any

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

Type declaration

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

Type declaration

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

Type declaration

    • (this: GlobalEventHandlers, ev: Event): any
    • Fires when the user repositions the scroll box in the scroll bar on the object.

      Parameters

      Returns any

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

    • (this: Document, ev: Event): any
    • Parameters

      Returns any

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

Type declaration

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

Type declaration

    • (this: GlobalEventHandlers, ev: Event): any
    • Occurs when playback stops because the next frame of a video resource is not available.

      Parameters

      Returns any

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

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

Type declaration

ownerDocument: null
parentElement: HTMLElement

Returns the parent element.

parentNode: ParentNode

Returns the parent.

pictureInPictureElement: Element
pictureInPictureEnabled: boolean
plugins: HTMLCollectionOf<HTMLEmbedElement>

Return an HTMLCollection of the embed elements in the Document.

pointerLockElement: Element
previousSibling: ChildNode

Returns the previous sibling.

readyState: DocumentReadyState

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

referrer: string

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

rootElement: SVGSVGElement

Deprecated

scripts: HTMLCollectionOf<HTMLScriptElement>

Retrieves a collection of all script objects in the document.

scrollingElement: Element
styleSheets: StyleSheetList

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: string
title: string

Contains the title of the document.

visibilityState: DocumentVisibilityState
vlinkColor: string

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

Deprecated

Accessors

  • get location(): Location
  • Contains information about the current URL.

    Returns Location

  • set location(href: string | Location): void
  • Parameters

    Returns void

Methods

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

    Type Parameters

    Parameters

    • node: T

    Returns T

  • Inserts nodes after the last child of node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Type Parameters

    Parameters

    • node: T

    Returns T

  • Deprecated

    Returns void

  • Deprecated

    Parameters

    • x: number
    • y: number

    Returns Range

  • Deprecated

    Returns void

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

    Parameters

    • Optional deep: boolean

    Returns Node

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

    Returns void

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

    Parameters

    Returns number

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

    Parameters

    Returns boolean

  • Creates an attribute object with a specified name.

    Parameters

    • localName: string

    Returns Attr

  • Parameters

    • namespace: string
    • qualifiedName: string

    Returns Attr

  • Returns a CDATASection node whose data is data.

    Parameters

    • data: string

    Returns CDATASection

  • Creates a comment object with the specified data.

    Parameters

    • data: string

      Sets the comment object's data.

    Returns Comment

  • Creates a new document.

    Returns DocumentFragment

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

    Parameters

    • namespaceURI: "http://www.w3.org/1999/xhtml"
    • qualifiedName: string

    Returns HTMLElement

  • Type Parameters

    Parameters

    • namespaceURI: "http://www.w3.org/2000/svg"
    • qualifiedName: K

    Returns SVGElementTagNameMap[K]

  • Parameters

    • namespaceURI: "http://www.w3.org/2000/svg"
    • qualifiedName: string

    Returns SVGElement

  • Parameters

    Returns Element

  • Parameters

    Returns Element

  • Parameters

    • eventInterface: "AnimationEvent"

    Returns AnimationEvent

  • Parameters

    • eventInterface: "AnimationPlaybackEvent"

    Returns AnimationPlaybackEvent

  • Parameters

    • eventInterface: "AudioProcessingEvent"

    Returns AudioProcessingEvent

  • Parameters

    • eventInterface: "BeforeUnloadEvent"

    Returns BeforeUnloadEvent

  • Parameters

    • eventInterface: "BlobEvent"

    Returns BlobEvent

  • Parameters

    • eventInterface: "ClipboardEvent"

    Returns ClipboardEvent

  • Parameters

    • eventInterface: "CloseEvent"

    Returns CloseEvent

  • Parameters

    • eventInterface: "CompositionEvent"

    Returns CompositionEvent

  • Parameters

    • eventInterface: "CustomEvent"

    Returns CustomEvent<any>

  • Parameters

    • eventInterface: "DeviceMotionEvent"

    Returns DeviceMotionEvent

  • Parameters

    • eventInterface: "DeviceOrientationEvent"

    Returns DeviceOrientationEvent

  • Parameters

    • eventInterface: "DragEvent"

    Returns DragEvent

  • Parameters

    • eventInterface: "ErrorEvent"

    Returns ErrorEvent

  • Parameters

    • eventInterface: "Event"

    Returns Event

  • Parameters

    • eventInterface: "Events"

    Returns Event

  • Parameters

    • eventInterface: "FocusEvent"

    Returns FocusEvent

  • Parameters

    • eventInterface: "FontFaceSetLoadEvent"

    Returns FontFaceSetLoadEvent

  • Parameters

    • eventInterface: "FormDataEvent"

    Returns FormDataEvent

  • Parameters

    • eventInterface: "GamepadEvent"

    Returns GamepadEvent

  • Parameters

    • eventInterface: "HashChangeEvent"

    Returns HashChangeEvent

  • Parameters

    • eventInterface: "IDBVersionChangeEvent"

    Returns IDBVersionChangeEvent

  • Parameters

    • eventInterface: "InputEvent"

    Returns InputEvent

  • Parameters

    • eventInterface: "KeyboardEvent"

    Returns KeyboardEvent

  • Parameters

    • eventInterface: "MediaEncryptedEvent"

    Returns MediaEncryptedEvent

  • Parameters

    • eventInterface: "MediaKeyMessageEvent"

    Returns MediaKeyMessageEvent

  • Parameters

    • eventInterface: "MediaQueryListEvent"

    Returns MediaQueryListEvent

  • Parameters

    • eventInterface: "MediaStreamTrackEvent"

    Returns MediaStreamTrackEvent

  • Parameters

    • eventInterface: "MessageEvent"

    Returns MessageEvent<any>

  • Parameters

    • eventInterface: "MouseEvent"

    Returns MouseEvent

  • Parameters

    • eventInterface: "MouseEvents"

    Returns MouseEvent

  • Parameters

    • eventInterface: "MutationEvent"

    Returns MutationEvent

  • Parameters

    • eventInterface: "MutationEvents"

    Returns MutationEvent

  • Parameters

    • eventInterface: "OfflineAudioCompletionEvent"

    Returns OfflineAudioCompletionEvent

  • Parameters

    • eventInterface: "PageTransitionEvent"

    Returns PageTransitionEvent

  • Parameters

    • eventInterface: "PaymentMethodChangeEvent"

    Returns PaymentMethodChangeEvent

  • Parameters

    • eventInterface: "PaymentRequestUpdateEvent"

    Returns PaymentRequestUpdateEvent

  • Parameters

    • eventInterface: "PictureInPictureEvent"

    Returns PictureInPictureEvent

  • Parameters

    • eventInterface: "PointerEvent"

    Returns PointerEvent

  • Parameters

    • eventInterface: "PopStateEvent"

    Returns PopStateEvent

  • Parameters

    • eventInterface: "ProgressEvent"

    Returns ProgressEvent<EventTarget>

  • Parameters

    • eventInterface: "PromiseRejectionEvent"

    Returns PromiseRejectionEvent

  • Parameters

    • eventInterface: "RTCDTMFToneChangeEvent"

    Returns RTCDTMFToneChangeEvent

  • Parameters

    • eventInterface: "RTCDataChannelEvent"

    Returns RTCDataChannelEvent

  • Parameters

    • eventInterface: "RTCErrorEvent"

    Returns RTCErrorEvent

  • Parameters

    • eventInterface: "RTCPeerConnectionIceErrorEvent"

    Returns RTCPeerConnectionIceErrorEvent

  • Parameters

    • eventInterface: "RTCPeerConnectionIceEvent"

    Returns RTCPeerConnectionIceEvent

  • Parameters

    • eventInterface: "RTCTrackEvent"

    Returns RTCTrackEvent

  • Parameters

    • eventInterface: "SecurityPolicyViolationEvent"

    Returns SecurityPolicyViolationEvent

  • Parameters

    • eventInterface: "SpeechSynthesisErrorEvent"

    Returns SpeechSynthesisErrorEvent

  • Parameters

    • eventInterface: "SpeechSynthesisEvent"

    Returns SpeechSynthesisEvent

  • Parameters

    • eventInterface: "StorageEvent"

    Returns StorageEvent

  • Parameters

    • eventInterface: "SubmitEvent"

    Returns SubmitEvent

  • Parameters

    • eventInterface: "TouchEvent"

    Returns TouchEvent

  • Parameters

    • eventInterface: "TrackEvent"

    Returns TrackEvent

  • Parameters

    • eventInterface: "TransitionEvent"

    Returns TransitionEvent

  • Parameters

    • eventInterface: "UIEvent"

    Returns UIEvent

  • Parameters

    • eventInterface: "UIEvents"

    Returns UIEvent

  • Parameters

    • eventInterface: "WebGLContextEvent"

    Returns WebGLContextEvent

  • Parameters

    • eventInterface: "WheelEvent"

    Returns WheelEvent

  • Parameters

    • eventInterface: string

    Returns Event

  • Parameters

    Returns XPathNSResolver

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

    Parameters

    • root: Node

      The root element or node to start traversing on.

    • Optional whatToShow: number

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

    • Optional filter: NodeFilter

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

    Returns NodeIterator

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

    Parameters

    • target: string
    • data: string

    Returns ProcessingInstruction

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

    Returns Range

  • Creates a text string from the specified value.

    Parameters

    • data: string

      String that specifies the nodeValue property of the text node.

    Returns Text

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

    Parameters

    • root: Node

      The root element or node to start traversing on.

    • Optional whatToShow: number

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

    • Optional filter: NodeFilter

      A custom NodeFilter function to use.

    Returns TreeWalker

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

    Parameters

    • event: Event

    Returns boolean

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

    Parameters

    • x: number

      The x-offset

    • y: number

      The y-offset

    Returns Element

  • Parameters

    • x: number
    • y: number

    Returns Element[]

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

    Deprecated

    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.

    • Optional showUI: boolean

      Display the user interface, defaults to false.

    • Optional value: string

      Value to assign.

    Returns boolean

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

    Returns Promise<void>

  • Returns Promise<void>

  • Returns void

  • Returns Animation[]

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

    Parameters

    • elementId: string

      String that specifies the ID value.

    Returns HTMLElement

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

    Parameters

    • classNames: string

    Returns HTMLCollectionOf<Element>

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

    Parameters

    • elementName: string

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

    Returns NodeListOf<HTMLElement>

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

    Type Parameters

    Parameters

    • qualifiedName: K

    Returns HTMLCollectionOf<HTMLElementTagNameMap[K]>

  • Type Parameters

    Parameters

    • qualifiedName: K

    Returns HTMLCollectionOf<SVGElementTagNameMap[K]>

  • Parameters

    • qualifiedName: string

    Returns HTMLCollectionOf<Element>

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

    Parameters

    • namespaceURI: "http://www.w3.org/1999/xhtml"
    • localName: string

    Returns HTMLCollectionOf<HTMLElement>

  • Parameters

    • namespaceURI: "http://www.w3.org/2000/svg"
    • localName: string

    Returns HTMLCollectionOf<SVGElement>

  • Parameters

    • namespace: string
    • localName: string

    Returns HTMLCollectionOf<Element>

  • Returns node's root.

    Parameters

    Returns Node

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

    Returns Selection

  • Returns whether node has children.

    Returns boolean

  • Gets a value indicating whether the object currently has focus.

    Returns boolean

  • Returns Promise<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.

    Type Parameters

    Parameters

    • node: T
    • Optional deep: boolean

    Returns T

  • Type Parameters

    Parameters

    • node: T
    • child: Node

    Returns T

  • Parameters

    • namespace: string

    Returns boolean

  • Returns whether node and otherNode have the same properties.

    Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Parameters

    • prefix: string

    Returns string

  • Parameters

    • namespace: string

    Returns string

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

    Returns void

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

    Parameters

    • Optional unused1: string
    • Optional unused2: string

    Returns Document

  • Parameters

    • url: string | URL
    • name: string
    • features: string

    Returns Window

  • Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

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

    Deprecated

    Parameters

    • commandId: string

      Specifies a command identifier.

    Returns boolean

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

    Deprecated

    Parameters

    • commandId: string

      String that specifies a command identifier.

    Returns boolean

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

    Deprecated

    Parameters

    • commandId: string

      String that specifies a command identifier.

    Returns boolean

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

    Deprecated

    Parameters

    • commandId: string

      Specifies a command identifier.

    Returns boolean

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

    Deprecated

    Parameters

    • commandId: string

      String that specifies a command identifier.

    Returns string

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

    Type Parameters

    Parameters

    • selectors: K

    Returns HTMLElementTagNameMap[K]

  • Type Parameters

    Parameters

    • selectors: K

    Returns SVGElementTagNameMap[K]

  • Type Parameters

    • E extends Element<E> = Element

    Parameters

    • selectors: string

    Returns E

  • Returns all element descendants of node that match selectors.

    Type Parameters

    Parameters

    • selectors: K

    Returns NodeListOf<HTMLElementTagNameMap[K]>

  • Type Parameters

    Parameters

    • selectors: K

    Returns NodeListOf<SVGElementTagNameMap[K]>

  • Type Parameters

    • E extends Element<E> = Element

    Parameters

    • selectors: string

    Returns NodeListOf<E>

  • Deprecated

    Returns void

  • Type Parameters

    Parameters

    • child: T

    Returns T

  • Type Parameters

    Parameters

    • node: Node
    • child: T

    Returns T

  • Replace all children of node with nodes, while replacing strings in nodes with equivalent Text nodes.

    Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.

    Parameters

    • Rest ...nodes: (string | Node)[]

    Returns void

  • Returns Promise<void>

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

    Parameters

    • Rest ...text: string[]

    Returns void

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

    Parameters

    • Rest ...text: string[]

    Returns void