(error)
| 145 | |
| 146 | // Show error |
| 147 | function showError(error) { |
| 148 | if (!errorDiv) return |
| 149 | |
| 150 | if (error) { |
| 151 | errorDiv.textContent = error.message || 'An error occurred' |
| 152 | errorDiv.style.display = 'block' |
| 153 | } else { |
| 154 | errorDiv.style.display = 'none' |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | // Escape HTML to prevent XSS |
| 159 | function escapeHtml(text) { |