Lines 22-27
document.addEventListener("DOMContentLoaded", function() {
Link Here
|
22 |
const errorMessage = match ? match[1] : error.message; |
22 |
const errorMessage = match ? match[1] : error.message; |
23 |
|
23 |
|
24 |
console.error(error); |
24 |
console.error(error); |
25 |
document.getElementById('barcode-container').innerHTML = "<p><strong>" + __("Error:") + " </strong>${errorMessage}</p>"; |
25 |
if (errorMessage){ |
|
|
26 |
const para = document.createElement('p'); |
27 |
const strong = document.createElement('strong'); |
28 |
strong.textContent = __("Error: "); |
29 |
let err_msg = document.createTextNode(errorMessage); |
30 |
para.appendChild(strong); |
31 |
para.appendChild(err_msg); |
32 |
document.getElementById('barcode-container').replaceChildren(para); |
33 |
} |
26 |
} |
34 |
} |
27 |
}); |
35 |
}); |
28 |
- |
|
|