From 2113f8269423932fa76ae4f822f77a07dd703266 Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Thu, 13 Nov 2025 13:23:25 +0200 Subject: Refactor, add light rail and tram stops --- app/dom.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'app/dom.js') diff --git a/app/dom.js b/app/dom.js index 508636a..4419205 100644 --- a/app/dom.js +++ b/app/dom.js @@ -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; @@ -109,6 +109,16 @@ export class Dom { return input; } + /** + * Create a `` + * @param {string} text + */ + static strong(text) { + const strong = document.createElement("strong"); + strong.textContent = text; + return strong; + } + /** * Create a `