import { el as UniversalEl, ElementOrSelector, html, InferElementType, } from "@commonmodule/universal-page"; import DomNode, { DomChild } from "./DomNode.js"; export default function el( elementOrSelector: EOS, ...children: DomChild[] ): DomNode> { return new DomNode(elementOrSelector, ...children) as DomNode< InferElementType >; } UniversalEl.impl = el; html.impl = (htmlContent: string) => { const parser = new DOMParser(); const doc = parser.parseFromString(htmlContent, "text/html"); return new DomNode(doc.body.firstChild as HTMLElement); };