aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets/handlers/handlePV.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webAO/packets/handlers/handlePV.ts')
-rw-r--r--webAO/packets/handlers/handlePV.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/webAO/packets/handlers/handlePV.ts b/webAO/packets/handlers/handlePV.ts
index ba48f36..2e14ad2 100644
--- a/webAO/packets/handlers/handlePV.ts
+++ b/webAO/packets/handlers/handlePV.ts
@@ -34,15 +34,17 @@ export const handlePV = async (args: string[]) => {
const { emotes } = client;
const emotesList = document.getElementById("client_emo");
emotesList.style.display = "";
- emotesList.innerHTML = ""; // Clear emote box
+ emotesList.replaceChildren();
const ini = await ensureCharIni(client.charID);
me.side = ini.options.side;
updateActionCommands(me.side);
if (ini.emotions.number === 0) {
- emotesList.innerHTML = `<span
- id="emo_0"
- alt="unavailable"
- class="emote_button">No emotes available</span>`;
+ let emotesUnavail = document.createElement("span");
+ emotesUnavail.id = "emo_0";
+ emotesUnavail.className = "emote_button";
+ emotesUnavail.textContent = "No emotes available";
+
+ emotesList.replaceChildren(emotesUnavail);
} else {
// Probe extensions once using button1_off, then reuse for all emotes
const charPath = `${AO_HOST}characters/${encodeURI(me.name)}/emotions/`;