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 id=elementId href=#>link</a>'"
setOuterHtml("elementId", element("a", { tagProps: { id: "elementId", href: "#" }, children: "link" }))
function setOuterHtml(
element: string,
html: string | string[],
{ isTemplateLiteral }?,
): string;
§
setOuterHtml(element: string, html: string | string[], { isTemplateLiteral }?): 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]
§
{ isTemplateLiteral }? optional
[src]

§Return Type

§
string
[src]