Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

ParentNode

interface ParentNode extends Node {
readonly childElementCount: number;
readonly children: HTMLCollection;
readonly firstElementChild: Element | null;
readonly lastElementChild: Element | null;
append(...nodes: (Node | string)[]): void;
prepend(...nodes: (Node | string)[]): void;
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null;
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null;
querySelector<E extends Element = Element>(selectors: string): E | null;
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>;
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>;
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>;
replaceChildren(...nodes: (Node | string)[]): void;
}

§Extends

§Properties

§
readonly childElementCount: number
[src]
§
readonly children: HTMLCollection
[src]

Returns the child elements.

§
readonly firstElementChild: Element | null
[src]

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

§
readonly lastElementChild: Element | null
[src]

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

§Methods

§
append(...nodes: (Node | string)[]): void
[src]

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.

§
prepend(...nodes: (Node | string)[]): void
[src]

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

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

§
querySelector<K extends keyof HTMLElementTagNameMap>(selectors: K): HTMLElementTagNameMap[K] | null
[src]

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

§
querySelector<K extends keyof SVGElementTagNameMap>(selectors: K): SVGElementTagNameMap[K] | null
[src]
§
querySelector<E extends Element = Element>(selectors: string): E | null
[src]
§
querySelectorAll<K extends keyof HTMLElementTagNameMap>(selectors: K): NodeListOf<HTMLElementTagNameMap[K]>
[src]

Returns all element descendants of node that match selectors.

§
querySelectorAll<K extends keyof SVGElementTagNameMap>(selectors: K): NodeListOf<SVGElementTagNameMap[K]>
[src]
§
querySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E>
[src]
§
replaceChildren(...nodes: (Node | string)[]): void
[src]

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.