From 0b967d5463c3474983fb531a366c285c07776eda Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 8 Sep 2023 15:45:15 +0200 Subject: menu seperators --- client-web/source/helper.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'client-web/source/helper.ts') diff --git a/client-web/source/helper.ts b/client-web/source/helper.ts index 336f7d4..c0c41a3 100644 --- a/client-web/source/helper.ts +++ b/client-web/source/helper.ts @@ -41,10 +41,7 @@ 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 } @@ -89,4 +86,4 @@ export function array_swap(arr: T[], a: number, b: number) { const temp = arr[a] arr[a] = arr[b] arr[b] = temp -} \ No newline at end of file +} -- cgit v1.2.3-70-g09d2