From d6a43612d13d899da113208710a79eca712de29f Mon Sep 17 00:00:00 2001 From: Nordine Bittich Date: Tue, 13 Feb 2024 20:16:11 +0100 Subject: [PATCH] use toggle form instead of d-none before init wasm --- adana-playground/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/adana-playground/app.js b/adana-playground/app.js index c8284e1..b6c9845 100644 --- a/adana-playground/app.js +++ b/adana-playground/app.js @@ -17,9 +17,6 @@ function toggleForm(form, toggle) { } async function run() { const form = document.querySelector("form"); - form.classList.add("d-none"); - - let compute = await loadWasmContext(); // uncomment this to create the heap from javascript // const memory = new WebAssembly.Memory({ @@ -29,8 +26,10 @@ async function run() { // }); // const ctx = new Uint8Array(memory.buffer); - form.classList.remove("d-none"); + toggleForm(form, true); + let compute = await loadWasmContext(); + toggleForm(form, false); const text_area = document.querySelector("#code"); text_area.value = ""; text_area.focus();