/** * Creates an HTML Element from a given string. Only use this when using * Preact isn't practical. */ export function createElementFromString(input: string): T { const template = document.createElement("template"); template.innerHTML = input.trim(); return template.content.firstElementChild as T; }