aboutsummaryrefslogtreecommitdiff
path: root/frontend/helper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/helper.ts')
-rw-r--r--frontend/helper.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/frontend/helper.ts b/frontend/helper.ts
index 827a204..c511b59 100644
--- a/frontend/helper.ts
+++ b/frontend/helper.ts
@@ -34,10 +34,8 @@ function apply_opts<E extends HTMLElement>(e: E, o: Opts<E>) {
export function e<K extends keyof HTMLElementTagNameMap>(name: K, opts: Opts<HTMLElementTagNameMap[K]>, ...children: (HTMLElement | string)[]): HTMLElementTagNameMap[K] {
const el = document.createElement(name)
apply_opts(el, opts)
- for (const c of children) {
- if (typeof c == "string") el.textContent += c
- else el.append(c)
- }
+ for (const c of children)
+ el.append(c)
return el
}