diff options
Diffstat (limited to 'vhosts/blog/nuldoc-src/dom.ts')
| -rw-r--r-- | vhosts/blog/nuldoc-src/dom.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vhosts/blog/nuldoc-src/dom.ts b/vhosts/blog/nuldoc-src/dom.ts index 0358d53b..bc10e134 100644 --- a/vhosts/blog/nuldoc-src/dom.ts +++ b/vhosts/blog/nuldoc-src/dom.ts @@ -89,13 +89,13 @@ function makeTextNode(content: string): Text { export function el( name: string, - attrs: [string, string][], + attrs: Record<string, string>, ...children: (Node | string)[] ): Element { return { kind: "element", name: name, - attributes: new Map(attrs), + attributes: new Map(Object.entries(attrs)), children: children.map((n) => typeof n === "string" ? makeTextNode(n) : n), }; } |
