diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-14 11:47:49 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-14 11:47:49 +0200 |
| commit | d41ac3c094f733a8038885de3400ed7558b2b878 (patch) | |
| tree | a9a7cd54900e0b0c66f3293f4ff6bc6ad5cbbec6 /app/dom.js | |
| parent | 6ca89c37f84c6b1d63c869e6471d3570d51f63be (diff) | |
| download | housing-d41ac3c094f733a8038885de3400ed7558b2b878.tar.zst | |
Minor tuning
Diffstat (limited to 'app/dom.js')
| -rw-r--r-- | app/dom.js | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -121,10 +121,14 @@ export class Dom { /** * Create a `<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); |
