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

element

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

generates a HTML Element

@example
// returns "<div><span id=s style=width:50%>Hello World!</div>"
element("div", {
  children: element("span", {
    tagProps: { id: "s", style: "width:50%" },
    children: "Hello World!",
  }),
  closed: true,
})
function element(tagName: string, { tagProps, children, closed }: ElementProps): string;
§
element(tagName: string, { tagProps, children, closed }: ElementProps): string
[src]

§Parameters

§
tagName: string
[src]
§
{ tagProps, children, closed }: ElementProps
[src]

§Return Type

§
string
[src]