From d41ac3c094f733a8038885de3400ed7558b2b878 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Fri, 14 Nov 2025 11:47:49 +0200 Subject: Minor tuning --- app/dom.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/dom.js') diff --git a/app/dom.js b/app/dom.js index 8e73a09..11d2a0a 100644 --- a/app/dom.js +++ b/app/dom.js @@ -121,10 +121,14 @@ export class Dom { /** * Create a `` + * @param {string} url * @param {DomOptions} o + * @param {string|undefined} text */ - static a(o) { + static a(url, o, text) { const link = document.createElement("a"); + if (text) link.text = text; + link.href = url; Object.assign(link.style, o.styles); if (o.id) link.id = o.id; for (const cls of o.classes) link.classList.add(cls); -- cgit v1.2.3-70-g09d2