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

x/html_parser/src/mod.ts>DomUtils.replaceElement

Port of fb55/htmlparser2 for Deno
Latest
function DomUtils.replaceElement
import { DomUtils } from "https://deno.land/x/html_parser@v0.1.3/src/mod.ts";
const { replaceElement } = DomUtils;

Replace an element in the dom

Parameters

elem: Node

The element to be replaced

replacement: Node

The element to be added