Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

setOuterHtml

import { setOuterHtml } from "https://raw.githubusercontent.com/Hatscat/MetavaScript/main/index.ts";

set the outerHTML of an Element

@example
// returns "elementId.outerHTML='<a href=#>link</a>'"
setOuterHtml("elementId", element("a", { tagProps: { href: "#" }, children: "link", closed: true }))
function setOuterHtml(element: string, html: string | string[]): string;
§
setOuterHtml(element: string, html: string | string[]): string
[src]

§Parameters

§
element: string
[src]

a variable name referring to an HTML element, it can be the element ID according to the "Named access on the Window object" rule of the HTML specification.

§
html: string | string[]
[src]

§Return Type

§
string
[src]