Skip to content

Commit

Permalink
Make the Run/Stop buttons respond to whether the program is running
Browse files Browse the repository at this point in the history
  • Loading branch information
tuzz committed Jan 15, 2024
1 parent 1612e37 commit 2548c64
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pyodide/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@
let interruptBuffer;

run.addEventListener("click", () => {
run.disabled = true;
stop.disabled = false;

output.innerText = "";
visual.innerText = "";
config.innerText = "";
Expand Down Expand Up @@ -120,10 +123,10 @@

if (output.innerText === "Loading pyodide...") {
output.innerText = "";

run.disabled = false;
stop.disabled = false;
}

run.disabled = false;
stop.disabled = true;
};

const handleOutput = (stream, content) => {
Expand Down

0 comments on commit 2548c64

Please sign in to comment.