(elementId, shouldShow)
| 28 | |
| 29 | // Basic DOM Helpers |
| 30 | export function toggleVisibility(elementId, shouldShow) { |
| 31 | const element = document.getElementById(elementId); |
| 32 | if (element) { |
| 33 | element.style.display = shouldShow ? "block" : "none"; |
| 34 | } else { |
| 35 | console.error(t("element_not_found", { id: elementId })); |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | export function escapeHTML(str) { |
| 40 | return String(str) |
no test coverage detected