diff options
author | metamuffin <metamuffin@disroot.org> | 2023-09-08 15:45:15 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-09-08 15:45:15 +0200 |
commit | 0b967d5463c3474983fb531a366c285c07776eda (patch) | |
tree | 4f3fee4c312912c54b94e54ea73ec8445ee424f7 /client-web/source/helper.ts | |
parent | 7c3864fac1ded20e8137cf637ea55693492cf1f6 (diff) | |
download | keks-meet-0b967d5463c3474983fb531a366c285c07776eda.tar keks-meet-0b967d5463c3474983fb531a366c285c07776eda.tar.bz2 keks-meet-0b967d5463c3474983fb531a366c285c07776eda.tar.zst |
menu seperators
Diffstat (limited to 'client-web/source/helper.ts')
-rw-r--r-- | client-web/source/helper.ts | 7 |
1 files changed, 2 insertions, 5 deletions
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 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 } @@ -89,4 +86,4 @@ export function array_swap<T>(arr: T[], a: number, b: number) { const temp = arr[a] arr[a] = arr[b] arr[b] = temp -}
\ No newline at end of file +} |