diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src/dom.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/dom.ts | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/vhosts/blog/nuldoc-src/dom.ts b/vhosts/blog/nuldoc-src/dom.ts index bc10e134..478cbc6c 100644 --- a/vhosts/blog/nuldoc-src/dom.ts +++ b/vhosts/blog/nuldoc-src/dom.ts @@ -78,24 +78,3 @@ export function forEachChildRecursively(e: Element, f: (n: Node) => void) { }; forEachChild(e, g); } - -function makeTextNode(content: string): Text { - return { - kind: "text", - content: content, - raw: false, - }; -} - -export function el( - name: string, - attrs: Record<string, string>, - ...children: (Node | string)[] -): Element { - return { - kind: "element", - name: name, - attributes: new Map(Object.entries(attrs)), - children: children.map((n) => typeof n === "string" ? makeTextNode(n) : n), - }; -} |
