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

x/deno_dom/src/dom/utils.ts>getOuterOrInnerHtml

Browser DOM & HTML parser in Deno
Very Popular
Go to Latest
function getOuterOrInnerHtml
import { getOuterOrInnerHtml } from "https://deno.land/x/deno_dom@v0.1.43/src/dom/utils.ts";

.innerHTML/.outerHTML implementation without recursion to avoid stack overflows

Parameters

parentElement: Element
asOuterHtml: boolean

Returns

string