Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/gauntlet/imports/happy_dom.ts>DocumentFragment

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

DocumentFragment.

Properties

readonly
childElementCount: number

Last element child.

readonly
children: IHTMLCollection<IElement>
readonly
firstElementChild: IElement

First element child.

readonly
lastElementChild: IElement

Last element child.

nodeType: number
textContent: string

Get text value of children.

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.

Append a child node to childNodes.

cloneNode(deep?: boolean): IDocumentFragment

Clones a node.

Returns an element by ID.

insertBefore(newNode: INode, referenceNode?: INode): INode

Inserts a node before another.

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.

Remove Child element from childNodes array.

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

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