Search


Search something to see results

Document

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

MDN Reference

interface Document {
    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;
    addEventListener<K extends keyof DocumentEventMap>(
        type: K,
        listener: (this: Document, 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: Document, ev: DocumentEventMap[K]) => any,
        options?: boolean | EventListenerOptions,
    ): void;
    removeEventListener(
        type: string,
        listener: EventListenerOrEventListenerObject,
        options?: boolean | EventListenerOptions,
    ): 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;
    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)

Index

Properties

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

Accessors

Methods

<internal>.Document.adoptNode<internal>.Document.captureEvents<internal>.Document.caretPositionFromPoint<internal>.Document.caretRangeFromPoint<internal>.Document.clear<internal>.Document.close<internal>.Document.createAttribute<internal>.Document.createAttributeNS<internal>.Document.createCDATASection<internal>.Document.createComment<internal>.Document.createDocumentFragment<internal>.Document.createElement<internal>.Document.createElementNS<internal>.Document.createEvent<internal>.Document.createNodeIterator<internal>.Document.createProcessingInstruction<internal>.Document.createRange<internal>.Document.createTextNode<internal>.Document.createTreeWalker<internal>.Document.execCommand<internal>.Document.exitFullscreen<internal>.Document.exitPictureInPicture<internal>.Document.exitPointerLock<internal>.Document.getElementById<internal>.Document.getElementsByClassName<internal>.Document.getElementsByName<internal>.Document.getElementsByTagName<internal>.Document.getElementsByTagNameNS<internal>.Document.getSelection<internal>.Document.hasFocus<internal>.Document.hasStorageAccess<internal>.Document.importNode<internal>.Document.open<internal>.Document.queryCommandEnabled<internal>.Document.queryCommandIndeterm<internal>.Document.queryCommandState<internal>.Document.queryCommandSupported<internal>.Document.queryCommandValue<internal>.Document.releaseEvents<internal>.Document.requestStorageAccess<internal>.Document.startViewTransition<internal>.Document.write<internal>.Document.writeln<internal>.Document.addEventListener<internal>.Document.removeEventListener<internal>.Document.elementFromPoint<internal>.Document.elementsFromPoint<internal>.Document.getAnimations<internal>.Document.dispatchEvent<internal>.Document.appendChild<internal>.Document.cloneNode<internal>.Document.compareDocumentPosition<internal>.Document.contains<internal>.Document.getRootNode<internal>.Document.hasChildNodes<internal>.Document.insertBefore<internal>.Document.isDefaultNamespace<internal>.Document.isEqualNode<internal>.Document.isSameNode<internal>.Document.lookupNamespaceURI<internal>.Document.lookupPrefix<internal>.Document.normalize<internal>.Document.removeChild<internal>.Document.replaceChild<internal>.Document.append<internal>.Document.prepend<internal>.Document.querySelector<internal>.Document.querySelectorAll<internal>.Document.replaceChildren<internal>.Document.createExpression<internal>.Document.createNSResolver<internal>.Document.evaluate

Properties

charging?: boolean
chargingTime?: number
dischargingTime?: number
level?: number
onbeforexrselect:
    | null
    | ((this: GlobalEventHandlers, ev: XRSessionEvent) => any)

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.

URL: string

Sets or gets the URL for the current document.

MDN Reference

alinkColor: string

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

MDN Reference

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

MDN Reference

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.

MDN Reference

Retrieves a collection of all applet objects in the document.

MDN Reference

bgColor: string

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

MDN Reference

Specifies the beginning and end of the document body.

MDN Reference

characterSet: string

Returns document's encoding.

MDN Reference

charset: string

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

This is a legacy alias of characterSet.

MDN Reference

compatMode: string

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

MDN Reference

contentType: string

Returns document's content type.

MDN Reference

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.

MDN Reference

currentScript: null | 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.

MDN Reference

defaultView: null | Window & typeof globalThis

Returns the Window object of the active document.

MDN Reference

designMode: string

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

MDN Reference

dir: string

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

MDN Reference

doctype: null | DocumentType

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

MDN Reference

documentElement: HTMLElement

Gets a reference to the root node of the document.

MDN Reference

documentURI: string

Returns document's URL.

MDN Reference

domain: string

Sets or gets the security domain of the document.

MDN Reference

embeds: HTMLCollectionOf<HTMLEmbedElement>

Retrieves a collection of all embed objects in the document.

MDN Reference

fgColor: string

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

MDN Reference

forms: HTMLCollectionOf<HTMLFormElement>

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

MDN Reference

fragmentDirective: FragmentDirective
fullscreen: boolean

MDN Reference

fullscreenEnabled: boolean

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

MDN Reference

Returns the head element.

MDN Reference

hidden: boolean
images: HTMLCollectionOf<HTMLImageElement>

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

MDN Reference

implementation: DOMImplementation

Gets the implementation object of the current document.

MDN Reference

inputEncoding: string

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

This is a legacy alias of characterSet.

MDN Reference

lastModified: string

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

MDN Reference

linkColor: string

Sets or gets the color of the document links.

MDN Reference

links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>

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

MDN Reference

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)

Fires when the state of the object has changed.

The event

MDN Reference

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

Returns the node document. Returns null for documents.

MDN Reference

pictureInPictureEnabled: boolean
plugins: HTMLCollectionOf<HTMLEmbedElement>

Return an HTMLCollection of the embed elements in the Document.

MDN Reference

readyState: DocumentReadyState

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

MDN Reference

referrer: string

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

MDN Reference

rootElement: null | SVGSVGElement

MDN Reference

scripts: HTMLCollectionOf<HTMLScriptElement>

Retrieves a collection of all script objects in the document.

MDN Reference

scrollingElement: null | Element
title: string

Contains the title of the document.

MDN Reference

visibilityState: DocumentVisibilityState
vlinkColor: string

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

MDN Reference

activeElement: null | 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.

MDN Reference

adoptedStyleSheets: CSSStyleSheet[]
fullscreenElement: null | Element

Returns document's fullscreen element.

MDN Reference

pictureInPictureElement: null | Element
pointerLockElement: null | 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.

MDN Reference

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

Fires when the user aborts the download.

The event.

MDN Reference

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)

Fires when the object loses the input focus.

The focus event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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)

Fires when the user double-clicks the object.

The mouse event.

MDN Reference

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

Fires on the source object continuously during a drag operation.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The drag event.

MDN Reference

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

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

The drag event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the duration attribute is updated.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the end of playback is reached.

The event

MDN Reference

Fires when an error occurs during object loading.

The event.

MDN Reference

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

Fires when the object receives focus.

The event.

MDN Reference

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)

Fires when the user presses a key.

The keyboard event

MDN Reference

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

Fires when the user presses an alphanumeric key.

The event.

MDN Reference

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

Fires when the user releases a key.

The keyboard event

MDN Reference

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

Fires immediately after the browser loads the object.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when Internet Explorer begins looking for media data.

The event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

Fires when the user moves the mouse over the object.

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

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

The mouse event.

MDN Reference

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

Occurs when playback is paused.

The event.

MDN Reference

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

Occurs when the play method is requested.

The event.

MDN Reference

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

Occurs when the audio or video has started playing.

The event.

MDN Reference

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)

Occurs to indicate progress while downloading media data.

The event.

MDN Reference

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

Occurs when the playback rate is increased or decreased.

The event.

MDN Reference

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

Fires when the user resets a form.

The event.

MDN Reference

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

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

The event.

MDN Reference

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

Occurs when the seek operation ends.

The event.

MDN Reference

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

Occurs when the current playback position is moved.

The event.

MDN Reference

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

Fires when the current selection changes.

The event.

MDN Reference

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)

Occurs when the download has stopped.

The event.

MDN Reference

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

Occurs if the load operation has been intentionally halted.

The event.

MDN Reference

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

Occurs to indicate the current playback position.

The event.

MDN Reference

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)

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

The event.

MDN Reference

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

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

The event.

MDN Reference

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

This is a legacy alias of onanimationend.

MDN Reference

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

This is a legacy alias of onanimationiteration.

MDN Reference

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

This is a legacy alias of onanimationstart.

MDN Reference

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

This is a legacy alias of ontransitionend.

MDN Reference

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

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

MDN Reference

childNodes: NodeListOf<ChildNode>

Returns the children.

MDN Reference

firstChild: null | ChildNode

Returns the first child.

MDN Reference

isConnected: boolean

Returns true if node is connected and false otherwise.

MDN Reference

lastChild: null | ChildNode

Returns the last child.

MDN Reference

nextSibling: null | ChildNode

Returns the next sibling.

MDN Reference

nodeName: string

Returns a string appropriate for the type of node.

MDN Reference

nodeType: number

Returns the type of node.

MDN Reference

nodeValue: null | string
parentElement: null | HTMLElement

Returns the parent element.

MDN Reference

parentNode: null | ParentNode

Returns the parent.

MDN Reference

previousSibling: null | ChildNode

Returns the previous sibling.

MDN Reference

textContent: null | string
ELEMENT_NODE: 1

node is an element.

ATTRIBUTE_NODE: 2
TEXT_NODE: 3

node is a Text node.

CDATA_SECTION_NODE: 4

node is a CDATASection node.

ENTITY_REFERENCE_NODE: 5
ENTITY_NODE: 6
PROCESSING_INSTRUCTION_NODE: 7

node is a ProcessingInstruction node.

COMMENT_NODE: 8

node is a Comment node.

DOCUMENT_NODE: 9

node is a document.

DOCUMENT_TYPE_NODE: 10

node is a doctype.

DOCUMENT_FRAGMENT_NODE: 11

node is a DocumentFragment node.

NOTATION_NODE: 12
DOCUMENT_POSITION_DISCONNECTED: 1

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

DOCUMENT_POSITION_PRECEDING: 2

Set when other is preceding node.

DOCUMENT_POSITION_FOLLOWING: 4

Set when other is following node.

DOCUMENT_POSITION_CONTAINS: 8

Set when other is an ancestor of node.

DOCUMENT_POSITION_CONTAINED_BY: 16

Set when other is a descendant of node.

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: 32
childElementCount: number
children: HTMLCollection

Returns the child elements.

MDN Reference

firstElementChild: null | Element

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

MDN Reference

lastElementChild: null | Element

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

MDN Reference

Accessors

  • get location(): Location

    Contains information about the current URL.

    MDN Reference

    Returns Location

  • set location(href: string): void

    Parameters

    • href: string

    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.

MDN Reference

Type Parameters

Parameters

  • node: T

Returns T

Returns void

Parameters

Returns null | CaretPosition

Parameters

  • x: number
  • y: number

Returns null | Range

Returns void

MDN Reference

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

MDN Reference

Returns void

Creates an attribute object with a specified name.

Parameters

  • localName: string

Returns Attr

Parameters

  • namespace: null | string
  • qualifiedName: string

Returns Attr

Returns a CDATASection node whose data is data.

MDN Reference

Parameters

  • data: string

Returns CDATASection

Creates a comment object with the specified data.

Parameters

Returns Comment

Creates a new document.

MDN Reference

Returns DocumentFragment

Creates an instance of the element for the specified tag.

Type Parameters

Parameters

Returns HTMLElementTagNameMap[K]

Type Parameters

Parameters

Returns HTMLElementDeprecatedTagNameMap[K]

Parameters

Returns HTMLElement

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.

MDN Reference

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

Type Parameters

Parameters

  • namespaceURI: "http://www.w3.org/1998/Math/MathML"
  • qualifiedName: K

Returns MathMLElementTagNameMap[K]

Parameters

  • namespaceURI: "http://www.w3.org/1998/Math/MathML"
  • qualifiedName: string

Returns MathMLElement

Parameters

Returns Element

Parameters

Returns Element

Parameters

  • eventInterface: "AnimationEvent"

Returns AnimationEvent

MDN Reference

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: "ContentVisibilityAutoStateChangeEvent"

Returns ContentVisibilityAutoStateChangeEvent

Parameters

  • eventInterface: "CustomEvent"

Returns CustomEvent

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: "MIDIConnectionEvent"

Returns MIDIConnectionEvent

Parameters

  • eventInterface: "MIDIMessageEvent"

Returns MIDIMessageEvent

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

Parameters

  • eventInterface: "MouseEvent"

Returns MouseEvent

Parameters

  • eventInterface: "MouseEvents"

Returns MouseEvent

Parameters

  • eventInterface: "OfflineAudioCompletionEvent"

Returns OfflineAudioCompletionEvent

Parameters

  • eventInterface: "PageRevealEvent"

Returns PageRevealEvent

Parameters

  • eventInterface: "PageSwapEvent"

Returns PageSwapEvent

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

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: "TextEvent"

Returns TextEvent

Parameters

  • eventInterface: "ToggleEvent"

Returns ToggleEvent

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

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.

  • OptionalwhatToShow: number

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

  • Optionalfilter: null | NodeFilter

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

    MDN Reference

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.

MDN Reference

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.

MDN Reference

Returns Range

Creates a text string from the specified value.

Parameters

  • data: string

    String that specifies the nodeValue property of the text node.

    MDN Reference

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.

  • OptionalwhatToShow: number

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

  • Optionalfilter: null | NodeFilter

    A custom NodeFilter function to use.

    MDN Reference

Returns TreeWalker

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

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.

  • OptionalshowUI: boolean

    Display the user interface, defaults to false.

  • Optionalvalue: string

    Value to assign.

Returns boolean

MDN Reference

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

MDN Reference

Returns Promise<void>

Returns Promise<void>

Returns void

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

MDN Reference

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.

    MDN Reference

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

Type Parameters

Parameters

  • qualifiedName: K

Returns HTMLCollectionOf<MathMLElementTagNameMap[K]>

Type Parameters

Parameters

  • qualifiedName: K

Returns HTMLCollectionOf<HTMLElementDeprecatedTagNameMap[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.

MDN Reference

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

  • namespaceURI: "http://www.w3.org/1998/Math/MathML"
  • localName: string

Returns HTMLCollectionOf<MathMLElement>

Parameters

  • namespace: null | string
  • localName: string

Returns HTMLCollectionOf<Element>

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

MDN Reference

Returns null | Selection

Gets a value indicating whether the object currently has focus.

MDN Reference

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.

MDN Reference

Type Parameters

Parameters

  • node: T
  • Optionalsubtree: boolean

Returns T

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

  • Optionalunused1: string
  • Optionalunused2: string

Returns Document

Parameters

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

Returns null | Window

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

Parameters

  • commandId: string

    Specifies a command identifier.

Returns boolean

MDN Reference

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

Parameters

  • commandId: string

    String that specifies a command identifier.

Returns boolean

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

Parameters

  • commandId: string

    String that specifies a command identifier.

Returns boolean

MDN Reference

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

Parameters

  • commandId: string

    Specifies a command identifier.

Returns boolean

MDN Reference

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

Parameters

  • commandId: string

    String that specifies a command identifier.

Returns string

Returns void

Returns Promise<void>

Parameters

Returns ViewTransition

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

Parameters

  • text: string[]

Returns void

MDN Reference

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

Parameters

  • text: string[]

Returns void

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

MDN Reference

Type Parameters

Parameters

Returns void

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

MDN Reference

Parameters

Returns void

Removes the event listener in target's event listener list with the same type, callback, and options.

MDN Reference

Type Parameters

Parameters

Returns void

Removes the event listener in target's event listener list with the same type, callback, and options.

MDN Reference

Parameters

Returns void

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 null | Element

Parameters

  • x: number
  • y: number

Returns Element[]

Returns Animation[]

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.

MDN Reference

Parameters

Returns boolean

Type Parameters

Parameters

  • node: T

Returns T

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

MDN Reference

Parameters

  • Optionalsubtree: boolean

Returns Node

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

MDN Reference

Parameters

Returns number

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

MDN Reference

Parameters

Returns boolean

Returns node's root.

MDN Reference

Parameters

Returns Node

Returns whether node has children.

MDN Reference

Returns boolean

Type Parameters

Parameters

  • node: T
  • child: null | Node

Returns T

Parameters

  • namespace: null | string

Returns boolean

Returns whether node and otherNode have the same properties.

MDN Reference

Parameters

  • otherNode: null | Node

Returns boolean

Parameters

  • otherNode: null | Node

Returns boolean

Parameters

  • prefix: null | string

Returns null | string

Parameters

  • namespace: null | string

Returns null | string

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

MDN Reference

Returns void

Type Parameters

Parameters

  • child: T

Returns T

Type Parameters

Parameters

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.

MDN Reference

Parameters

  • nodes: (string | Node)[]

Returns void

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

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

MDN Reference

Parameters

  • nodes: (string | Node)[]

Returns void

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

MDN Reference

Type Parameters

Parameters

  • selectors: K

Returns null | HTMLElementTagNameMap[K]

Type Parameters

Parameters

  • selectors: K

Returns null | SVGElementTagNameMap[K]

Type Parameters

Parameters

  • selectors: K

Returns null | MathMLElementTagNameMap[K]

Type Parameters

Parameters

  • selectors: K

Returns null | HTMLElementDeprecatedTagNameMap[K]

Type Parameters

Parameters

  • selectors: string

Returns null | E

Returns all element descendants of node that match selectors.

MDN Reference

Type Parameters

Parameters

  • selectors: K

Returns NodeListOf<HTMLElementTagNameMap[K]>

Type Parameters

Parameters

  • selectors: K

Returns NodeListOf<SVGElementTagNameMap[K]>

Type Parameters

Parameters

  • selectors: K

Returns NodeListOf<MathMLElementTagNameMap[K]>

Type Parameters

Parameters

  • selectors: K

Returns NodeListOf<HTMLElementDeprecatedTagNameMap[K]>

Type Parameters

Parameters

  • selectors: string

Returns NodeListOf<E>

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

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

MDN Reference

Parameters

  • nodes: (string | Node)[]

Returns void

Parameters

Returns XPathExpression

Parameters

Returns Node

MDN Reference

Parameters

Returns XPathResult