Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/gauntlet/imports/happy_dom.ts>IDocumentFragment

Work-in-progress front-end tool which does put a smile on my face
Latest
interface IDocumentFragment
implements INode
Re-export
import { type IDocumentFragment } from "https://deno.land/x/gauntlet@v0.0.9/imports/happy_dom.ts";

Properties

readonly
childElementCount: number
readonly
firstElementChild: IElement
readonly
lastElementChild: IElement
readonly
children: IElement[]

Methods

append(...nodes: (INode | string)[]): void

Inserts a set of Node objects or DOMString objects after the last child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.

prepend(...nodes: (INode | string)[]): void

Inserts a set of Node objects or DOMString objects before the first child of the ParentNode. DOMString objects are inserted as equivalent Text nodes.

querySelector(selector: string): IElement

Query CSS Selector to find matching node.

querySelectorAll(selector: string): IElement[]

Query CSS selector to find matching nodes.

replaceChildren(...nodes: (INode | string)[]): void

Replaces the existing children of a node with a specified new set of children.

getElementById(id: string): IElement

Returns an element by ID.

cloneNode(deep: boolean): IDocumentFragment

Clones a node.