Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_dom/deno-dom-native.ts>DocumentFragment

Browser DOM & HTML parser in Deno
Very Popular
Go to Latest
class DocumentFragment
extends Node
Re-export
import { DocumentFragment } from "https://deno.land/x/deno_dom@v0.1.36-alpha/deno-dom-native.ts";

Constructors

new
DocumentFragment()

Properties

readonly
childElementCount: number
readonly
children: HTMLCollection
readonly
firstElementChild: Element | null
readonly
lastElementChild: Element | null

Methods

append(...nodes: (Node | string)[])
getElementById(id: string): Element | null
prepend(...nodes: (Node | string)[])
querySelector(selectors: string): Element | null
querySelectorAll(selectors: string): NodeList
replaceChildren(...nodes: (Node | string)[])