Skip to content

Commit

Permalink
chore: update tetanes-web to v0.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lukexor committed Jun 12, 2024
1 parent 8aa997e commit a35c6ad
Show file tree
Hide file tree
Showing 4 changed files with 644 additions and 418 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
export default function () {
const loading = document.getElementById("loading-status");
const error = document.getElementById("error");
return {
onStart: () => {
console.log("Loading...");
console.time("initializer");
loading.classList.remove("hidden");
error.classList.add("hidden");
},
onProgress: ({ current, total }) => {
if (!total) {
Expand All @@ -14,13 +18,17 @@ export default function () {
onComplete: () => {
console.log("Loading... done!");
console.timeEnd("initializer");
loading.classList.add("hidden");
},
onSuccess: (wasm) => {
onSuccess: () => {
console.log("Loading... successful!");
console.log("WebAssembly: ", wasm);
error.classList.add("hidden");
},
onFailure: (error) => {
console.error(`Loading... failed! ${error}`);
loading.classList.add("hidden");
error.classList.remove("hidden");
error.innerText = `Loading... failed! ${error}`;
},
};
}
Loading

0 comments on commit a35c6ad

Please sign in to comment.