XMLDocument
charging?: boolean;
chargingTime?: number;
dischargingTime?: number;
level?: number;
onbeforexrselect:
| null
| ((this: GlobalEventHandlers, ev: XRSessionEvent) => any);
URL: string;
alinkColor: string;
all: HTMLAllCollection;
anchors: HTMLCollectionOf<HTMLAnchorElement>;
applets: HTMLCollection;
bgColor: string;
body: HTMLElement;
characterSet: string;
charset: string;
compatMode: string;
contentType: string;
cookie: string;
currentScript: null | HTMLOrSVGScriptElement;
defaultView: null | Window & typeof globalThis;
designMode: string;
dir: string;
doctype: null | DocumentType;
documentElement: HTMLElement;
documentURI: string;
domain: string;
embeds: HTMLCollectionOf<HTMLEmbedElement>;
fgColor: string;
forms: HTMLCollectionOf<HTMLFormElement>;
fragmentDirective: FragmentDirective;
fullscreen: boolean;
fullscreenEnabled: boolean;
head: HTMLHeadElement;
hidden: boolean;
images: HTMLCollectionOf<HTMLImageElement>;
implementation: DOMImplementation;
inputEncoding: string;
lastModified: string;
linkColor: string;
links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
get location(): Location;
set location(href: string): void;
onfullscreenchange: null | ((this: Document, ev: Event) => any);
onfullscreenerror: null | ((this: Document, ev: Event) => any);
onpointerlockchange: null | ((this: Document, ev: Event) => any);
onpointerlockerror: null | ((this: Document, ev: Event) => any);
onreadystatechange: null | ((this: Document, ev: Event) => any);
onvisibilitychange: null | ((this: Document, ev: Event) => any);
ownerDocument: null;
pictureInPictureEnabled: boolean;
plugins: HTMLCollectionOf<HTMLEmbedElement>;
readyState: DocumentReadyState;
referrer: string;
rootElement: null | SVGSVGElement;
scripts: HTMLCollectionOf<HTMLScriptElement>;
scrollingElement: null | Element;
timeline: DocumentTimeline;
title: string;
visibilityState: DocumentVisibilityState;
vlinkColor: string;
adoptNode<T extends Node>(node: T): T;
captureEvents(): void;
caretPositionFromPoint(
x: number,
y: number,
options?: CaretPositionFromPointOptions,
): null | CaretPosition;
caretRangeFromPoint(x: number, y: number): null | Range;
clear(): void;
close(): void;
createAttribute(localName: string): Attr;
createAttributeNS(namespace: null | string, qualifiedName: string): Attr;
createCDATASection(data: string): CDATASection;
createComment(data: string): Comment;
createDocumentFragment(): DocumentFragment;
createElement<K extends keyof HTMLElementTagNameMap>(
tagName: K,
options?: ElementCreationOptions,
): HTMLElementTagNameMap[K];
createElement<K extends keyof HTMLElementDeprecatedTagNameMap>(
tagName: K,
options?: ElementCreationOptions,
): HTMLElementDeprecatedTagNameMap[K];
createElement(
tagName: string,
options?: ElementCreationOptions,
): HTMLElement;
createElementNS(
namespaceURI: "http://www.w3.org/1999/xhtml",
qualifiedName: string,
): HTMLElement;
createElementNS<K extends keyof SVGElementTagNameMap>(
namespaceURI: "http://www.w3.org/2000/svg",
qualifiedName: K,
): SVGElementTagNameMap[K];
createElementNS(
namespaceURI: "http://www.w3.org/2000/svg",
qualifiedName: string,
): SVGElement;
createElementNS<K extends keyof MathMLElementTagNameMap>(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
qualifiedName: K,
): MathMLElementTagNameMap[K];
createElementNS(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
qualifiedName: string,
): MathMLElement;
createElementNS(
namespaceURI: null | string,
qualifiedName: string,
options?: ElementCreationOptions,
): Element;
createElementNS(
namespace: null | string,
qualifiedName: string,
options?: string | ElementCreationOptions,
): Element;
createEvent(eventInterface: "AnimationEvent"): AnimationEvent;
createEvent(
eventInterface: "AnimationPlaybackEvent",
): AnimationPlaybackEvent;
createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent;
createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent;
createEvent(eventInterface: "BlobEvent"): BlobEvent;
createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent;
createEvent(eventInterface: "CloseEvent"): CloseEvent;
createEvent(eventInterface: "CompositionEvent"): CompositionEvent;
createEvent(
eventInterface: "ContentVisibilityAutoStateChangeEvent",
): ContentVisibilityAutoStateChangeEvent;
createEvent(eventInterface: "CustomEvent"): CustomEvent;
createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent;
createEvent(
eventInterface: "DeviceOrientationEvent",
): DeviceOrientationEvent;
createEvent(eventInterface: "DragEvent"): DragEvent;
createEvent(eventInterface: "ErrorEvent"): ErrorEvent;
createEvent(eventInterface: "Event"): Event;
createEvent(eventInterface: "Events"): Event;
createEvent(eventInterface: "FocusEvent"): FocusEvent;
createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEvent;
createEvent(eventInterface: "FormDataEvent"): FormDataEvent;
createEvent(eventInterface: "GamepadEvent"): GamepadEvent;
createEvent(eventInterface: "HashChangeEvent"): HashChangeEvent;
createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEvent;
createEvent(eventInterface: "InputEvent"): InputEvent;
createEvent(eventInterface: "KeyboardEvent"): KeyboardEvent;
createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEvent;
createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEvent;
createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEvent;
createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEvent;
createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEvent;
createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent;
createEvent(eventInterface: "MessageEvent"): MessageEvent;
createEvent(eventInterface: "MouseEvent"): MouseEvent;
createEvent(eventInterface: "MouseEvents"): MouseEvent;
createEvent(
eventInterface: "OfflineAudioCompletionEvent",
): OfflineAudioCompletionEvent;
createEvent(eventInterface: "PageRevealEvent"): PageRevealEvent;
createEvent(eventInterface: "PageSwapEvent"): PageSwapEvent;
createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEvent;
createEvent(
eventInterface: "PaymentMethodChangeEvent",
): PaymentMethodChangeEvent;
createEvent(
eventInterface: "PaymentRequestUpdateEvent",
): PaymentRequestUpdateEvent;
createEvent(eventInterface: "PictureInPictureEvent"): PictureInPictureEvent;
createEvent(eventInterface: "PointerEvent"): PointerEvent;
createEvent(eventInterface: "PopStateEvent"): PopStateEvent;
createEvent(eventInterface: "ProgressEvent"): ProgressEvent;
createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEvent;
createEvent(
eventInterface: "RTCDTMFToneChangeEvent",
): RTCDTMFToneChangeEvent;
createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEvent;
createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEvent;
createEvent(
eventInterface: "RTCPeerConnectionIceErrorEvent",
): RTCPeerConnectionIceErrorEvent;
createEvent(
eventInterface: "RTCPeerConnectionIceEvent",
): RTCPeerConnectionIceEvent;
createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEvent;
createEvent(
eventInterface: "SecurityPolicyViolationEvent",
): SecurityPolicyViolationEvent;
createEvent(
eventInterface: "SpeechSynthesisErrorEvent",
): SpeechSynthesisErrorEvent;
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent;
createEvent(eventInterface: "StorageEvent"): StorageEvent;
createEvent(eventInterface: "SubmitEvent"): SubmitEvent;
createEvent(eventInterface: "TextEvent"): TextEvent;
createEvent(eventInterface: "ToggleEvent"): ToggleEvent;
createEvent(eventInterface: "TouchEvent"): TouchEvent;
createEvent(eventInterface: "TrackEvent"): TrackEvent;
createEvent(eventInterface: "TransitionEvent"): TransitionEvent;
createEvent(eventInterface: "UIEvent"): UIEvent;
createEvent(eventInterface: "UIEvents"): UIEvent;
createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent;
createEvent(eventInterface: "WheelEvent"): WheelEvent;
createEvent(eventInterface: string): Event;
createNodeIterator(
root: Node,
whatToShow?: number,
filter?: null | NodeFilter,
): NodeIterator;
createProcessingInstruction(
target: string,
data: string,
): ProcessingInstruction;
createRange(): Range;
createTextNode(data: string): Text;
createTreeWalker(
root: Node,
whatToShow?: number,
filter?: null | NodeFilter,
): TreeWalker;
execCommand(commandId: string, showUI?: boolean, value?: string): boolean;
exitFullscreen(): Promise<void>;
exitPictureInPicture(): Promise<void>;
exitPointerLock(): void;
getElementById(elementId: string): null | HTMLElement;
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
getElementsByName(elementName: string): NodeListOf<HTMLElement>;
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<HTMLElementTagNameMap[K]>;
getElementsByTagName<K extends keyof SVGElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<SVGElementTagNameMap[K]>;
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<MathMLElementTagNameMap[K]>;
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>;
getElementsByTagName(qualifiedName: string): HTMLCollectionOf<Element>;
getElementsByTagNameNS(
namespaceURI: "http://www.w3.org/1999/xhtml",
localName: string,
): HTMLCollectionOf<HTMLElement>;
getElementsByTagNameNS(
namespaceURI: "http://www.w3.org/2000/svg",
localName: string,
): HTMLCollectionOf<SVGElement>;
getElementsByTagNameNS(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
localName: string,
): HTMLCollectionOf<MathMLElement>;
getElementsByTagNameNS(
namespace: null | string,
localName: string,
): HTMLCollectionOf<Element>;
getSelection(): null | Selection;
hasFocus(): boolean;
hasStorageAccess(): Promise<boolean>;
importNode<T extends Node>(node: T, subtree?: boolean): T;
open(unused1?: string, unused2?: string): Document;
open(url: string | URL, name: string, features: string): null | Window;
queryCommandEnabled(commandId: string): boolean;
queryCommandIndeterm(commandId: string): boolean;
queryCommandState(commandId: string): boolean;
queryCommandSupported(commandId: string): boolean;
queryCommandValue(commandId: string): string;
releaseEvents(): void;
requestStorageAccess(): Promise<void>;
startViewTransition(
callbackOptions?: ViewTransitionUpdateCallback,
): ViewTransition;
write(...text: string[]): void;
writeln(...text: string[]): void;
activeElement: null | Element;
adoptedStyleSheets: CSSStyleSheet[];
fullscreenElement: null | Element;
pictureInPictureElement: null | Element;
pointerLockElement: null | Element;
styleSheets: StyleSheetList;
elementFromPoint(x: number, y: number): null | Element;
elementsFromPoint(x: number, y: number): Element[];
getAnimations(): Animation[];
dispatchEvent(event: Event): boolean;
fonts: FontFaceSet;
onabort: null | ((this: GlobalEventHandlers, ev: UIEvent) => any);
onanimationcancel:
| null
| ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
onanimationend:
| null
| ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
onanimationiteration:
| null
| ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
onanimationstart:
| null
| ((this: GlobalEventHandlers, ev: AnimationEvent) => any);
onauxclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onbeforeinput: null | ((this: GlobalEventHandlers, ev: InputEvent) => any);
onbeforetoggle: null | ((this: GlobalEventHandlers, ev: Event) => any);
onblur: null | ((this: GlobalEventHandlers, ev: FocusEvent) => any);
oncancel: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncanplay: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncanplaythrough: null | ((this: GlobalEventHandlers, ev: Event) => any);
onchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onclose: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncontextlost: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncontextmenu: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
oncontextrestored: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncopy: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
oncuechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
oncut: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
ondblclick: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
ondrag: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondragend: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondragenter: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondragleave: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondragover: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondragstart: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondrop: null | ((this: GlobalEventHandlers, ev: DragEvent) => any);
ondurationchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onemptied: null | ((this: GlobalEventHandlers, ev: Event) => any);
onended: null | ((this: GlobalEventHandlers, ev: Event) => any);
onerror: OnErrorEventHandler;
onfocus: null | ((this: GlobalEventHandlers, ev: FocusEvent) => any);
onformdata: null | ((this: GlobalEventHandlers, ev: FormDataEvent) => any);
ongotpointercapture:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
oninput: null | ((this: GlobalEventHandlers, ev: Event) => any);
oninvalid: null | ((this: GlobalEventHandlers, ev: Event) => any);
onkeydown: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
onkeypress: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
onkeyup: null | ((this: GlobalEventHandlers, ev: KeyboardEvent) => any);
onload: null | ((this: GlobalEventHandlers, ev: Event) => any);
onloadeddata: null | ((this: GlobalEventHandlers, ev: Event) => any);
onloadedmetadata: null | ((this: GlobalEventHandlers, ev: Event) => any);
onloadstart: null | ((this: GlobalEventHandlers, ev: Event) => any);
onlostpointercapture:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onmousedown: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmouseenter: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmouseleave: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmousemove: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmouseout: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmouseover: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onmouseup: null | ((this: GlobalEventHandlers, ev: MouseEvent) => any);
onpaste: null | ((this: GlobalEventHandlers, ev: ClipboardEvent) => any);
onpause: null | ((this: GlobalEventHandlers, ev: Event) => any);
onplay: null | ((this: GlobalEventHandlers, ev: Event) => any);
onplaying: null | ((this: GlobalEventHandlers, ev: Event) => any);
onpointercancel:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerdown:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerenter:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerleave:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointermove:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerout: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerover:
| null
| ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onpointerup: null | ((this: GlobalEventHandlers, ev: PointerEvent) => any);
onprogress: null | ((this: GlobalEventHandlers, ev: ProgressEvent) => any);
onratechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onreset: null | ((this: GlobalEventHandlers, ev: Event) => any);
onresize: null | ((this: GlobalEventHandlers, ev: UIEvent) => any);
onscroll: null | ((this: GlobalEventHandlers, ev: Event) => any);
onscrollend: null | ((this: GlobalEventHandlers, ev: Event) => any);
onsecuritypolicyviolation:
| null
| ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any);
onseeked: null | ((this: GlobalEventHandlers, ev: Event) => any);
onseeking: null | ((this: GlobalEventHandlers, ev: Event) => any);
onselect: null | ((this: GlobalEventHandlers, ev: Event) => any);
onselectionchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onselectstart: null | ((this: GlobalEventHandlers, ev: Event) => any);
onslotchange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onstalled: null | ((this: GlobalEventHandlers, ev: Event) => any);
onsubmit: null | ((this: GlobalEventHandlers, ev: SubmitEvent) => any);
onsuspend: null | ((this: GlobalEventHandlers, ev: Event) => any);
ontimeupdate: null | ((this: GlobalEventHandlers, ev: Event) => any);
ontoggle: null | ((this: GlobalEventHandlers, ev: Event) => any);
ontouchcancel?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
ontouchend?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
ontouchmove?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
ontouchstart?: null | ((this: GlobalEventHandlers, ev: TouchEvent) => any);
ontransitioncancel:
| null
| ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
ontransitionend:
| null
| ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
ontransitionrun:
| null
| ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
ontransitionstart:
| null
| ((this: GlobalEventHandlers, ev: TransitionEvent) => any);
onvolumechange: null | ((this: GlobalEventHandlers, ev: Event) => any);
onwaiting: null | ((this: GlobalEventHandlers, ev: Event) => any);
onwebkitanimationend:
| null
| ((this: GlobalEventHandlers, ev: Event) => any);
onwebkitanimationiteration:
| null
| ((this: GlobalEventHandlers, ev: Event) => any);
onwebkitanimationstart:
| null
| ((this: GlobalEventHandlers, ev: Event) => any);
onwebkittransitionend:
| null
| ((this: GlobalEventHandlers, ev: Event) => any);
onwheel: null | ((this: GlobalEventHandlers, ev: WheelEvent) => any);
baseURI: string;
childNodes: NodeListOf<ChildNode>;
firstChild: null | ChildNode;
isConnected: boolean;
lastChild: null | ChildNode;
nextSibling: null | ChildNode;
nodeName: string;
nodeType: number;
nodeValue: null | string;
parentElement: null | HTMLElement;
parentNode: null | ParentNode;
previousSibling: null | ChildNode;
textContent: null | string;
appendChild<T extends Node>(node: T): T;
cloneNode(subtree?: boolean): Node;
compareDocumentPosition(other: Node): number;
contains(other: null | Node): boolean;
getRootNode(options?: GetRootNodeOptions): Node;
hasChildNodes(): boolean;
insertBefore<T extends Node>(node: T, child: null | Node): T;
isDefaultNamespace(namespace: null | string): boolean;
isEqualNode(otherNode: null | Node): boolean;
isSameNode(otherNode: null | Node): boolean;
lookupNamespaceURI(prefix: null | string): null | string;
lookupPrefix(namespace: null | string): null | string;
normalize(): void;
removeChild<T extends Node>(child: T): T;
replaceChild<T extends Node>(node: Node, child: T): T;
ELEMENT_NODE: 1;
ATTRIBUTE_NODE: 2;
TEXT_NODE: 3;
CDATA_SECTION_NODE: 4;
ENTITY_REFERENCE_NODE: 5;
ENTITY_NODE: 6;
PROCESSING_INSTRUCTION_NODE: 7;
COMMENT_NODE: 8;
DOCUMENT_NODE: 9;
DOCUMENT_TYPE_NODE: 10;
DOCUMENT_FRAGMENT_NODE: 11;
NOTATION_NODE: 12;
DOCUMENT_POSITION_DISCONNECTED: 1;
DOCUMENT_POSITION_PRECEDING: 2;
DOCUMENT_POSITION_FOLLOWING: 4;
DOCUMENT_POSITION_CONTAINS: 8;
DOCUMENT_POSITION_CONTAINED_BY: 16;
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32;
childElementCount: number;
children: HTMLCollection;
firstElementChild: null | Element;
lastElementChild: null | Element;
append(...nodes: (string | Node)[]): void;
prepend(...nodes: (string | Node)[]): void;
querySelector<K extends keyof HTMLElementTagNameMap>(
selectors: K,
): null | HTMLElementTagNameMap[K];
querySelector<K extends keyof SVGElementTagNameMap>(
selectors: K,
): null | SVGElementTagNameMap[K];
querySelector<K extends keyof MathMLElementTagNameMap>(
selectors: K,
): null | MathMLElementTagNameMap[K];
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(
selectors: K,
): null | HTMLElementDeprecatedTagNameMap[K];
querySelector<E extends Element = Element>(selectors: string): null | E;
querySelectorAll<K extends keyof HTMLElementTagNameMap>(
selectors: K,
): NodeListOf<HTMLElementTagNameMap[K]>;
querySelectorAll<K extends keyof SVGElementTagNameMap>(
selectors: K,
): NodeListOf<SVGElementTagNameMap[K]>;
querySelectorAll<K extends keyof MathMLElementTagNameMap>(
selectors: K,
): NodeListOf<MathMLElementTagNameMap[K]>;
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(
selectors: K,
): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>;
querySelectorAll<E extends Element = Element>(
selectors: string,
): NodeListOf<E>;
replaceChildren(...nodes: (string | Node)[]): void;
addEventListener<K extends keyof DocumentEventMap>(
type: K,
listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): void;
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): void;
removeEventListener<K extends keyof DocumentEventMap>(
type: K,
listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): void;
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): void;
createExpression(
expression: string,
resolver?: null | XPathNSResolver,
): XPathExpression;
createNSResolver(nodeResolver: Node): Node;
evaluate(
expression: string,
contextNode: Node,
resolver?: null | XPathNSResolver,
type?: number,
result?: null | XPathResult,
): XPathResult;
}
Hierarchy (View Summary)
- Document
- XMLDocument
Index
Properties
Accessors
Methods
Properties
Optionalcharging
Optionalcharging Time
Optionaldischarging Time
Optionallevel
onbeforexrselect
An XRSessionEvent of type beforexrselect is dispatched on the DOM overlay element before generating a WebXR selectstart input event if the -Z axis of the input source's targetRaySpace intersects the DOM overlay element at the time the input device's primary action is triggered.
ReadonlyURL
Sets or gets the URL for the current document.
alink Color
Sets or gets the color of all active links in the document.
Readonlyall
Returns a reference to the collection of elements contained by the object.
Readonlyanchors
Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
Readonlyapplets
Retrieves a collection of all applet objects in the document.
bg Color
Deprecated. Sets or retrieves a value that indicates the background color behind the object.
body
Specifies the beginning and end of the document body.
Readonlycharacter Set
Returns document's encoding.
Readonlycharset
Gets or sets the character set used to encode the object.
Readonlycompat Mode
Gets a value that indicates whether standards-compliant mode is switched on for the object.
Readonlycontent Type
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.
Readonlycurrent Script
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.
Readonlydefault View
Returns the Window object of the active document.
design Mode
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.
Readonlydoctype
Gets an object representing the document type declaration associated with the current document.
Readonlydocument Element
Gets a reference to the root node of the document.
Readonlydocument URI
Returns document's URL.
domain
Sets or gets the security domain of the document.
Readonlyembeds
Retrieves a collection of all embed objects in the document.
fg Color
Sets or gets the foreground (text) color of the document.
Readonlyforms
Retrieves a collection, in source order, of all form objects in the document.
Readonlyfragment Directive
Readonlyfullscreen
Readonlyfullscreen Enabled
Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.
Readonlyhead
Returns the head element.
Readonlyhidden
Readonlyimages
Retrieves a collection, in source order, of img objects in the document.
Readonlyimplementation
Gets the implementation object of the current document.
Readonlyinput Encoding
Returns the character encoding used to create the webpage that is loaded into the document object.
Readonlylast Modified
Gets the date that the page was last modified, if the page supplies one.
link Color
Sets or gets the color of the document links.
Readonlylinks
Retrieves a collection of all a objects that specify the href property and all area objects in the document.
onfullscreenchange
onfullscreenerror
onpointerlockchange
onpointerlockerror
onreadystatechange
Fires when the state of the object has changed.
onvisibilitychange
Readonlyowner Document
Returns the node document. Returns null for documents.
Readonlypicture In Picture Enabled
Readonlyplugins
Return an HTMLCollection of the embed elements in the Document.
Readonlyready State
Retrieves a value that indicates the current state of the object.
Readonlyreferrer
Gets the URL of the location that referred the user to the current page.
Readonlyroot Element
Readonlyscripts
Retrieves a collection of all script objects in the document.
Readonlyscrolling Element
Readonlytimeline
title
Contains the title of the document.
Readonlyvisibility State
vlink Color
Sets or gets the color of the links that the user has visited.
Readonlyactive 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.
adopted Style Sheets
Readonlyfullscreen Element
Returns document's fullscreen element.
Readonlypicture In Picture Element
Readonlypointer Lock Element
Readonlystyle Sheets
Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
Readonlyfonts
onabort
Fires when the user aborts the download.
onanimationcancel
onanimationend
onanimationiteration
onanimationstart
onauxclick
onbeforeinput
onbeforetoggle
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
oncontextlost
oncontextmenu
Fires when the user clicks the right mouse button in the client area, opening the context menu.
oncontextrestored
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.
onscrollend
onsecuritypolicyviolation
| null
| ((this: GlobalEventHandlers, ev: SecurityPolicyViolationEvent) => any)
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
Optionalontouchcancel
Optionalontouchend
Optionalontouchmove
Optionalontouchstart
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
Readonlybase URI
Returns node's node document's document base URL.
Readonlychild Nodes
Returns the children.
Readonlyfirst Child
Returns the first child.
Readonlyis Connected
Returns true if node is connected and false otherwise.
Readonlylast Child
Returns the last child.
Readonlynext Sibling
Returns the next sibling.
Readonlynode Name
Returns a string appropriate for the type of node.
Readonlynode Type
Returns the type of node.
node Value
Readonlyparent Element
Returns the parent element.
Readonlyparent Node
Returns the parent.
Readonlyprevious Sibling
Returns the previous sibling.
text Content
ReadonlyELEMENT_ NODE
node is an element.
ReadonlyATTRIBUTE_ NODE
ReadonlyTEXT_ NODE
node is a Text node.
ReadonlyCDATA_ SECTION_ NODE
node is a CDATASection node.
ReadonlyENTITY_ REFERENCE_ NODE
ReadonlyENTITY_ NODE
ReadonlyPROCESSING_ INSTRUCTION_ NODE
node is a ProcessingInstruction node.
ReadonlyCOMMENT_ NODE
node is a Comment node.
ReadonlyDOCUMENT_ NODE
node is a document.
ReadonlyDOCUMENT_ TYPE_ NODE
node is a doctype.
ReadonlyDOCUMENT_ FRAGMENT_ NODE
node is a DocumentFragment node.
ReadonlyNOTATION_ NODE
ReadonlyDOCUMENT_ POSITION_ DISCONNECTED
Set when node and other are not in the same tree.
ReadonlyDOCUMENT_ POSITION_ PRECEDING
Set when other is preceding node.
ReadonlyDOCUMENT_ POSITION_ FOLLOWING
Set when other is following node.
ReadonlyDOCUMENT_ POSITION_ CONTAINS
Set when other is an ancestor of node.
ReadonlyDOCUMENT_ POSITION_ CONTAINED_ BY
Set when other is a descendant of node.
ReadonlyDOCUMENT_ POSITION_ IMPLEMENTATION_ SPECIFIC
Readonlychild Element Count
Readonlychildren
Returns the child elements.
Readonlyfirst Element Child
Returns the first child that is an element, and null otherwise.
Readonlylast Element Child
Returns the last child that is an element, and null otherwise.
Accessors
location
Contains information about the current URL.
Returns Location
- set location(href: string): void
Parameters
href: string
Returns void
Methods
adopt Node
capture Events
caret Position From Point
caretPositionFromPoint(
x: number,
y: number,
options?: CaretPositionFromPointOptions,
): null | CaretPositionParameters
x: numbery: numberOptionaloptions: CaretPositionFromPointOptions
Returns null | CaretPosition
caret Range From Point
clear
close
close(): voidCloses an output stream and forces the sent data to display.
Returns void
create Attribute
create Attribute NS
createAttributeNS(namespace: null | string, qualifiedName: string): Attrcreate CDATA Section
createCDATASection(data: string): CDATASectioncreate Comment
create Document Fragment
createDocumentFragment(): DocumentFragmentCreates a new document.
Returns DocumentFragment
create Element
createElement<K extends keyof HTMLElementTagNameMap>(
tagName: K,
options?: ElementCreationOptions,
): HTMLElementTagNameMap[K]Creates an instance of the element for the specified tag.
Type Parameters
- K extends keyof HTMLElementTagNameMap
Parameters
tagName: KThe name of an element.
Optionaloptions: ElementCreationOptions
Returns HTMLElementTagNameMap[K]
createElement<K extends keyof HTMLElementDeprecatedTagNameMap>(
tagName: K,
options?: ElementCreationOptions,
): HTMLElementDeprecatedTagNameMap[K]Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Parameters
tagName: KOptionaloptions: ElementCreationOptions
Returns HTMLElementDeprecatedTagNameMap[K]
createElement(tagName: string, options?: ElementCreationOptions): HTMLElementParameters
tagName: stringOptionaloptions: ElementCreationOptions
Returns HTMLElement
create Element NS
createElementNS(
namespaceURI: "http://www.w3.org/1999/xhtml",
qualifiedName: string,
): HTMLElementReturns 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
createElementNS<K extends keyof SVGElementTagNameMap>(
namespaceURI: "http://www.w3.org/2000/svg",
qualifiedName: K,
): SVGElementTagNameMap[K]Type Parameters
- K extends keyof SVGElementTagNameMap
Parameters
namespaceURI: "http://www.w3.org/2000/svg"qualifiedName: K
Returns SVGElementTagNameMap[K]
createElementNS(
namespaceURI: "http://www.w3.org/2000/svg",
qualifiedName: string,
): SVGElementParameters
namespaceURI: "http://www.w3.org/2000/svg"qualifiedName: string
Returns SVGElement
createElementNS<K extends keyof MathMLElementTagNameMap>(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
qualifiedName: K,
): MathMLElementTagNameMap[K]Type Parameters
- K extends keyof MathMLElementTagNameMap
Parameters
namespaceURI: "http://www.w3.org/1998/Math/MathML"qualifiedName: K
Returns MathMLElementTagNameMap[K]
createElementNS(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
qualifiedName: string,
): MathMLElementParameters
namespaceURI: "http://www.w3.org/1998/Math/MathML"qualifiedName: string
Returns MathMLElement
createElementNS(
namespaceURI: null | string,
qualifiedName: string,
options?: ElementCreationOptions,
): ElementParameters
namespaceURI: null | stringqualifiedName: stringOptionaloptions: ElementCreationOptions
Returns Element
createElementNS(
namespace: null | string,
qualifiedName: string,
options?: string | ElementCreationOptions,
): ElementParameters
namespace: null | stringqualifiedName: stringOptionaloptions: string | ElementCreationOptions
Returns Element
create Event
createEvent(eventInterface: "AnimationEvent"): AnimationEventcreateEvent(eventInterface: "AnimationPlaybackEvent"): AnimationPlaybackEventParameters
eventInterface: "AnimationPlaybackEvent"
Returns AnimationPlaybackEvent
createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEventParameters
eventInterface: "AudioProcessingEvent"
Returns AudioProcessingEvent
createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEventParameters
eventInterface: "BeforeUnloadEvent"
Returns BeforeUnloadEvent
createEvent(eventInterface: "BlobEvent"): BlobEventParameters
eventInterface: "BlobEvent"
Returns BlobEvent
createEvent(eventInterface: "ClipboardEvent"): ClipboardEventParameters
eventInterface: "ClipboardEvent"
Returns ClipboardEvent
createEvent(eventInterface: "CloseEvent"): CloseEventParameters
eventInterface: "CloseEvent"
Returns CloseEvent
createEvent(eventInterface: "CompositionEvent"): CompositionEventParameters
eventInterface: "CompositionEvent"
Returns CompositionEvent
createEvent(
eventInterface: "ContentVisibilityAutoStateChangeEvent",
): ContentVisibilityAutoStateChangeEventParameters
eventInterface: "ContentVisibilityAutoStateChangeEvent"
Returns ContentVisibilityAutoStateChangeEvent
createEvent(eventInterface: "CustomEvent"): CustomEventParameters
eventInterface: "CustomEvent"
Returns CustomEvent
createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEventParameters
eventInterface: "DeviceMotionEvent"
Returns DeviceMotionEvent
createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEventParameters
eventInterface: "DeviceOrientationEvent"
Returns DeviceOrientationEvent
createEvent(eventInterface: "DragEvent"): DragEventParameters
eventInterface: "DragEvent"
Returns DragEvent
createEvent(eventInterface: "ErrorEvent"): ErrorEventParameters
eventInterface: "ErrorEvent"
Returns ErrorEvent
createEvent(eventInterface: "FocusEvent"): FocusEventParameters
eventInterface: "FocusEvent"
Returns FocusEvent
createEvent(eventInterface: "FontFaceSetLoadEvent"): FontFaceSetLoadEventParameters
eventInterface: "FontFaceSetLoadEvent"
Returns FontFaceSetLoadEvent
createEvent(eventInterface: "FormDataEvent"): FormDataEventParameters
eventInterface: "FormDataEvent"
Returns FormDataEvent
createEvent(eventInterface: "GamepadEvent"): GamepadEventParameters
eventInterface: "GamepadEvent"
Returns GamepadEvent
createEvent(eventInterface: "HashChangeEvent"): HashChangeEventParameters
eventInterface: "HashChangeEvent"
Returns HashChangeEvent
createEvent(eventInterface: "IDBVersionChangeEvent"): IDBVersionChangeEventParameters
eventInterface: "IDBVersionChangeEvent"
Returns IDBVersionChangeEvent
createEvent(eventInterface: "InputEvent"): InputEventParameters
eventInterface: "InputEvent"
Returns InputEvent
createEvent(eventInterface: "KeyboardEvent"): KeyboardEventParameters
eventInterface: "KeyboardEvent"
Returns KeyboardEvent
createEvent(eventInterface: "MIDIConnectionEvent"): MIDIConnectionEventParameters
eventInterface: "MIDIConnectionEvent"
Returns MIDIConnectionEvent
createEvent(eventInterface: "MIDIMessageEvent"): MIDIMessageEventParameters
eventInterface: "MIDIMessageEvent"
Returns MIDIMessageEvent
createEvent(eventInterface: "MediaEncryptedEvent"): MediaEncryptedEventParameters
eventInterface: "MediaEncryptedEvent"
Returns MediaEncryptedEvent
createEvent(eventInterface: "MediaKeyMessageEvent"): MediaKeyMessageEventParameters
eventInterface: "MediaKeyMessageEvent"
Returns MediaKeyMessageEvent
createEvent(eventInterface: "MediaQueryListEvent"): MediaQueryListEventParameters
eventInterface: "MediaQueryListEvent"
Returns MediaQueryListEvent
createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEventParameters
eventInterface: "MediaStreamTrackEvent"
Returns MediaStreamTrackEvent
createEvent(eventInterface: "MessageEvent"): MessageEventParameters
eventInterface: "MessageEvent"
Returns MessageEvent
createEvent(eventInterface: "MouseEvent"): MouseEventParameters
eventInterface: "MouseEvent"
Returns MouseEvent
createEvent(eventInterface: "MouseEvents"): MouseEventParameters
eventInterface: "MouseEvents"
Returns MouseEvent
createEvent(
eventInterface: "OfflineAudioCompletionEvent",
): OfflineAudioCompletionEventParameters
eventInterface: "OfflineAudioCompletionEvent"
Returns OfflineAudioCompletionEvent
createEvent(eventInterface: "PageRevealEvent"): PageRevealEventParameters
eventInterface: "PageRevealEvent"
Returns PageRevealEvent
createEvent(eventInterface: "PageSwapEvent"): PageSwapEventParameters
eventInterface: "PageSwapEvent"
Returns PageSwapEvent
createEvent(eventInterface: "PageTransitionEvent"): PageTransitionEventParameters
eventInterface: "PageTransitionEvent"
Returns PageTransitionEvent
createEvent(
eventInterface: "PaymentMethodChangeEvent",
): PaymentMethodChangeEventParameters
eventInterface: "PaymentMethodChangeEvent"
Returns PaymentMethodChangeEvent
createEvent(
eventInterface: "PaymentRequestUpdateEvent",
): PaymentRequestUpdateEventParameters
eventInterface: "PaymentRequestUpdateEvent"
Returns PaymentRequestUpdateEvent
createEvent(eventInterface: "PictureInPictureEvent"): PictureInPictureEventParameters
eventInterface: "PictureInPictureEvent"
Returns PictureInPictureEvent
createEvent(eventInterface: "PointerEvent"): PointerEventParameters
eventInterface: "PointerEvent"
Returns PointerEvent
createEvent(eventInterface: "PopStateEvent"): PopStateEventParameters
eventInterface: "PopStateEvent"
Returns PopStateEvent
createEvent(eventInterface: "ProgressEvent"): ProgressEventParameters
eventInterface: "ProgressEvent"
Returns ProgressEvent
createEvent(eventInterface: "PromiseRejectionEvent"): PromiseRejectionEventParameters
eventInterface: "PromiseRejectionEvent"
Returns PromiseRejectionEvent
createEvent(eventInterface: "RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEventParameters
eventInterface: "RTCDTMFToneChangeEvent"
Returns RTCDTMFToneChangeEvent
createEvent(eventInterface: "RTCDataChannelEvent"): RTCDataChannelEventParameters
eventInterface: "RTCDataChannelEvent"
Returns RTCDataChannelEvent
createEvent(eventInterface: "RTCErrorEvent"): RTCErrorEventParameters
eventInterface: "RTCErrorEvent"
Returns RTCErrorEvent
createEvent(
eventInterface: "RTCPeerConnectionIceErrorEvent",
): RTCPeerConnectionIceErrorEventParameters
eventInterface: "RTCPeerConnectionIceErrorEvent"
Returns RTCPeerConnectionIceErrorEvent
createEvent(
eventInterface: "RTCPeerConnectionIceEvent",
): RTCPeerConnectionIceEventParameters
eventInterface: "RTCPeerConnectionIceEvent"
Returns RTCPeerConnectionIceEvent
createEvent(eventInterface: "RTCTrackEvent"): RTCTrackEventParameters
eventInterface: "RTCTrackEvent"
Returns RTCTrackEvent
createEvent(
eventInterface: "SecurityPolicyViolationEvent",
): SecurityPolicyViolationEventParameters
eventInterface: "SecurityPolicyViolationEvent"
Returns SecurityPolicyViolationEvent
createEvent(
eventInterface: "SpeechSynthesisErrorEvent",
): SpeechSynthesisErrorEventParameters
eventInterface: "SpeechSynthesisErrorEvent"
Returns SpeechSynthesisErrorEvent
createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEventParameters
eventInterface: "SpeechSynthesisEvent"
Returns SpeechSynthesisEvent
createEvent(eventInterface: "StorageEvent"): StorageEventParameters
eventInterface: "StorageEvent"
Returns StorageEvent
createEvent(eventInterface: "SubmitEvent"): SubmitEventParameters
eventInterface: "SubmitEvent"
Returns SubmitEvent
createEvent(eventInterface: "TextEvent"): TextEventParameters
eventInterface: "TextEvent"
Returns TextEvent
createEvent(eventInterface: "ToggleEvent"): ToggleEventParameters
eventInterface: "ToggleEvent"
Returns ToggleEvent
createEvent(eventInterface: "TouchEvent"): TouchEventParameters
eventInterface: "TouchEvent"
Returns TouchEvent
createEvent(eventInterface: "TrackEvent"): TrackEventParameters
eventInterface: "TrackEvent"
Returns TrackEvent
createEvent(eventInterface: "TransitionEvent"): TransitionEventParameters
eventInterface: "TransitionEvent"
Returns TransitionEvent
createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEventParameters
eventInterface: "WebGLContextEvent"
Returns WebGLContextEvent
createEvent(eventInterface: "WheelEvent"): WheelEventParameters
eventInterface: "WheelEvent"
Returns WheelEvent
create Node Iterator
createNodeIterator(
root: Node,
whatToShow?: number,
filter?: null | NodeFilter,
): NodeIteratorCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
Parameters
root: NodeThe root element or node to start traversing on.
OptionalwhatToShow: numberThe type of nodes or elements to appear in the node list
Optionalfilter: null | NodeFilterA custom NodeFilter function to use. For more information, see filter. Use null for no filter.
Returns NodeIterator
create Processing Instruction
createProcessingInstruction(target: string, data: string): ProcessingInstructionReturns 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: stringdata: string
Returns ProcessingInstruction
create Range
create Text Node
create Tree Walker
createTreeWalker(
root: Node,
whatToShow?: number,
filter?: null | NodeFilter,
): TreeWalkerCreates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
Parameters
root: NodeThe root element or node to start traversing on.
OptionalwhatToShow: numberThe type of nodes or elements to appear in the node list. For more information, see whatToShow.
Optionalfilter: null | NodeFilterA custom NodeFilter function to use.
Returns TreeWalker
exec Command
execCommand(commandId: string, showUI?: boolean, value?: string): booleanExecutes a command on the current document, current selection, or the given range.
Parameters
commandId: stringString that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
OptionalshowUI: booleanDisplay the user interface, defaults to false.
Optionalvalue: stringValue to assign.
Returns boolean
exit Fullscreen
exit Picture In Picture
exit Pointer Lock
exitPointerLock(): voidReturns void
get Element By Id
getElementById(elementId: string): null | HTMLElementReturns a reference to the first object with the specified value of the ID attribute.
Parameters
elementId: stringString that specifies the ID value.
Returns null | HTMLElement
get Elements By Class Name
getElementsByClassName(classNames: string): HTMLCollectionOf<Element>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>
get Elements By Name
getElementsByName(elementName: string): NodeListOf<HTMLElement>Gets a collection of objects based on the value of the NAME or ID attribute.
Parameters
elementName: stringGets a collection of objects based on the value of the NAME or ID attribute.
Returns NodeListOf<HTMLElement>
get Elements By Tag Name
getElementsByTagName<K extends keyof HTMLElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<HTMLElementTagNameMap[K]>Retrieves a collection of objects based on the specified element name.
Type Parameters
- K extends keyof HTMLElementTagNameMap
Parameters
qualifiedName: K
Returns HTMLCollectionOf<HTMLElementTagNameMap[K]>
getElementsByTagName<K extends keyof SVGElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<SVGElementTagNameMap[K]>Type Parameters
- K extends keyof SVGElementTagNameMap
Parameters
qualifiedName: K
Returns HTMLCollectionOf<SVGElementTagNameMap[K]>
getElementsByTagName<K extends keyof MathMLElementTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<MathMLElementTagNameMap[K]>Type Parameters
- K extends keyof MathMLElementTagNameMap
Parameters
qualifiedName: K
Returns HTMLCollectionOf<MathMLElementTagNameMap[K]>
getElementsByTagName<K extends keyof HTMLElementDeprecatedTagNameMap>(
qualifiedName: K,
): HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Parameters
qualifiedName: K
Returns HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[K]>
get Elements By Tag Name NS
getElementsByTagNameNS(
namespaceURI: "http://www.w3.org/1999/xhtml",
localName: string,
): HTMLCollectionOf<HTMLElement>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>
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(
namespaceURI: "http://www.w3.org/1998/Math/MathML",
localName: string,
): HTMLCollectionOf<MathMLElement>Parameters
namespaceURI: "http://www.w3.org/1998/Math/MathML"localName: string
Returns HTMLCollectionOf<MathMLElement>
get Selection
has Focus
hasFocus(): booleanGets a value indicating whether the object currently has focus.
Returns boolean
has Storage Access
import Node
importNode<T extends Node>(node: T, subtree?: boolean): Topen
open(unused1?: string, unused2?: string): DocumentOpens 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
Optionalunused1: stringOptionalunused2: string
Returns Document
query Command Enabled
query Command Indeterm
query Command State
query Command Supported
query Command Value
release Events
request Storage Access
start View Transition
startViewTransition(
callbackOptions?: ViewTransitionUpdateCallback,
): ViewTransitionwrite
writeln
writeln(...text: string[]): voidWrites one or more HTML expressions, followed by a carriage return, to a document in the specified window.
Parameters
…text: string[]
Returns void
element From Point
elements From Point
get Animations
dispatch Event
append Child
clone Node
compare Document Position
contains
get Root Node
getRootNode(options?: GetRootNodeOptions): Nodehas Child Nodes
hasChildNodes(): booleanReturns whether node has children.
Returns boolean
insert Before
is Default Namespace
isDefaultNamespace(namespace: null | string): booleanis Equal Node
is Same Node
isSameNode(otherNode: null | Node): booleanlookup Namespace URI
lookupNamespaceURI(prefix: null | string): null | stringlookup Prefix
lookupPrefix(namespace: null | string): null | stringnormalize
normalize(): voidRemoves empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
Returns void
remove Child
replace Child
append
prepend
query Selector
querySelector<K extends keyof HTMLElementTagNameMap>(
selectors: K,
): null | HTMLElementTagNameMap[K]Returns the first element that is a descendant of node that matches selectors.
Type Parameters
- K extends keyof HTMLElementTagNameMap
Parameters
selectors: K
Returns null | HTMLElementTagNameMap[K]
querySelector<K extends keyof SVGElementTagNameMap>(
selectors: K,
): null | SVGElementTagNameMap[K]Type Parameters
- K extends keyof SVGElementTagNameMap
Parameters
selectors: K
Returns null | SVGElementTagNameMap[K]
querySelector<K extends keyof MathMLElementTagNameMap>(
selectors: K,
): null | MathMLElementTagNameMap[K]Type Parameters
- K extends keyof MathMLElementTagNameMap
Parameters
selectors: K
Returns null | MathMLElementTagNameMap[K]
querySelector<K extends keyof HTMLElementDeprecatedTagNameMap>(
selectors: K,
): null | HTMLElementDeprecatedTagNameMap[K]Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Parameters
selectors: K
Returns null | HTMLElementDeprecatedTagNameMap[K]
query Selector All
querySelectorAll<K extends keyof HTMLElementTagNameMap>(
selectors: K,
): NodeListOf<HTMLElementTagNameMap[K]>Returns all element descendants of node that match selectors.
Type Parameters
- K extends keyof HTMLElementTagNameMap
Parameters
selectors: K
Returns NodeListOf<HTMLElementTagNameMap[K]>
querySelectorAll<K extends keyof SVGElementTagNameMap>(
selectors: K,
): NodeListOf<SVGElementTagNameMap[K]>Type Parameters
- K extends keyof SVGElementTagNameMap
Parameters
selectors: K
Returns NodeListOf<SVGElementTagNameMap[K]>
querySelectorAll<K extends keyof MathMLElementTagNameMap>(
selectors: K,
): NodeListOf<MathMLElementTagNameMap[K]>Type Parameters
- K extends keyof MathMLElementTagNameMap
Parameters
selectors: K
Returns NodeListOf<MathMLElementTagNameMap[K]>
querySelectorAll<K extends keyof HTMLElementDeprecatedTagNameMap>(
selectors: K,
): NodeListOf<HTMLElementDeprecatedTagNameMap[K]>Type Parameters
- K extends keyof HTMLElementDeprecatedTagNameMap
Parameters
selectors: K
Returns NodeListOf<HTMLElementDeprecatedTagNameMap[K]>
replace Children
add Event Listener
addEventListener<K extends keyof DocumentEventMap>(
type: K,
listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any,
options?: boolean | AddEventListenerOptions,
): voidAppends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Type Parameters
- K extends keyof DocumentEventMap
Parameters
type: Klistener: (this: XMLDocument, ev: DocumentEventMap[K]) => anyOptionaloptions: boolean | AddEventListenerOptions
Returns void
addEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | AddEventListenerOptions,
): voidAppends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Parameters
type: stringlistener: EventListenerOrEventListenerObjectOptionaloptions: boolean | AddEventListenerOptions
Returns void
remove Event Listener
removeEventListener<K extends keyof DocumentEventMap>(
type: K,
listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any,
options?: boolean | EventListenerOptions,
): voidRemoves the event listener in target's event listener list with the same type, callback, and options.
Type Parameters
- K extends keyof DocumentEventMap
Parameters
type: Klistener: (this: XMLDocument, ev: DocumentEventMap[K]) => anyOptionaloptions: boolean | EventListenerOptions
Returns void
removeEventListener(
type: string,
listener: EventListenerOrEventListenerObject,
options?: boolean | EventListenerOptions,
): voidRemoves the event listener in target's event listener list with the same type, callback, and options.
Parameters
type: stringlistener: EventListenerOrEventListenerObjectOptionaloptions: boolean | EventListenerOptions
Returns void
create Expression
createExpression(
expression: string,
resolver?: null | XPathNSResolver,
): XPathExpressionParameters
expression: stringOptionalresolver: null | XPathNSResolver
Returns XPathExpression
create NS Resolver
evaluate
evaluate(
expression: string,
contextNode: Node,
resolver?: null | XPathNSResolver,
type?: number,
result?: null | XPathResult,
): XPathResultParameters
expression: stringcontextNode: NodeOptionalresolver: null | XPathNSResolverOptionaltype: numberOptionalresult: null | XPathResult
An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents.
MDN Reference