diff options
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); |
