diff options
| author | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-13 13:23:25 +0200 |
|---|---|---|
| committer | Petri Hienonen <petri.hienonen@gmail.com> | 2025-11-13 16:01:24 +0200 |
| commit | 2113f8269423932fa76ae4f822f77a07dd703266 (patch) | |
| tree | 564a92220ab89b91c17efa63fc94549a90445573 /app/dom.js | |
| parent | 4372d56a51a9596b1636d133b03057b0ba84c920 (diff) | |
| download | housing-2113f8269423932fa76ae4f822f77a07dd703266.tar.zst | |
Refactor, add light rail and tram stops
Diffstat (limited to 'app/dom.js')
| -rw-r--r-- | app/dom.js | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -38,7 +38,7 @@ export class Dom { * @param {DomOptions} options * @returns {HTMLDivElement} */ - static div(options) { + static div(options = new DomOptions()) { const div = document.createElement("div"); Object.assign(div.style, options.styles); if (options.id) div.id = options.id; @@ -110,6 +110,16 @@ export class Dom { } /** + * Create a `<strong>` + * @param {string} text + */ + static strong(text) { + const strong = document.createElement("strong"); + strong.textContent = text; + return strong; + } + + /** * Create a `<label>` * @param {string} to * @param {string} text |
