20 lines
457 B
JavaScript
20 lines
457 B
JavaScript
const errorElement = document.getElementById("error");
|
|
const loadingElement = document.getElementById("loading");
|
|
|
|
/**
|
|
* @param {any} error
|
|
*/
|
|
function showError(error) {
|
|
while (errorElement.children.length > 0) {
|
|
errorElement.removeChild(errorElement.firstChild);
|
|
}
|
|
|
|
errorElement.appendChild(components.error(error));
|
|
errorElement.style.display = null;
|
|
console.log(error);
|
|
}
|
|
|
|
function finishedLoading() {
|
|
loadingElement.style.display = 'none';
|
|
}
|