Skip to content

Commit

Permalink
Using textContent to set text
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotte committed Aug 14, 2024
1 parent aa5c1b3 commit cae7430
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bnplay-audio-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
console.log(error);
btnToggle.classList.remove("btn-ctrl-loading");
btnToggle.classList.add("btn-ctrl-error");
divStatus.innerHTML = error;
divStatus.textContent = error;
btnToggle.value = "ERROR";
});
}
Expand All @@ -164,10 +164,10 @@
divStatus = document.getElementById("divStatus");

if (bnp_isPlaying()) {
divStatus.innerHTML = "Playing...";
divStatus.textContent = "Playing...";
btnToggle.value = "STOP";
} else {
divStatus.innerHTML = "Stopped.";
divStatus.textContent = "Stopped.";
btnToggle.value = "PLAY";
}
}
Expand Down
4 changes: 2 additions & 2 deletions bnplay-audio-tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@
divStatus = document.getElementById("divStatus");

if (bnp_isPlaying()) {
divStatus.innerHTML = "Playing...";
divStatus.textContent = "Playing...";
btnToggle.value = "STOP";
} else {
divStatus.innerHTML = "Stopped.";
divStatus.textContent = "Stopped.";
btnToggle.value = "PLAY";
}
}
Expand Down

0 comments on commit cae7430

Please sign in to comment.