From 546a9cd375383fba9ee2fb6050935ca247e770f6 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 6 Nov 2023 20:28:27 +0100 Subject: insert hyperlink to source --- frontend/helper.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'frontend/helper.ts') 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: E, o: Opts) { export function e(name: K, opts: Opts, ...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 } -- cgit v1.2.3-70-g09d2