Skip to main content
variable createElement
import { createElement } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Creates an element from a string (without appending it to the document). if the given string contains multiple elements, only the first one will be returned.

Use document.createElement() to create a new element. Set its innerHTML to the string supplied as the argument. Use ParentNode.firstElementChild to return the element version of the string.

type

(str: string) => unknown