export function render(str: string, container?: HTMLElement) { if (!container) { container ||= document.createElement('div') document.body.appendChild(container) } container.innerHTML = str return container } export function cleanup() { while (document.body.firstChild) { document.body.firstChild.remove() } }