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