From e883bd2362c0117e4745876d92282235e1cc584c Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sun, 28 Jul 2024 15:45:39 +0530 Subject: Use textContent instead of innerText to write --- priv/static/discordActivity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/priv/static/discordActivity.js b/priv/static/discordActivity.js index f00ec1d..9cdaaf1 100644 --- a/priv/static/discordActivity.js +++ b/priv/static/discordActivity.js @@ -6,7 +6,7 @@ const updateInstanceRoomInfo = () => { const contentEl = document.getElementById("instance-room-info-content"); const defaultContents = document.createElement("i"); - defaultContents.innerText = "none yet"; + defaultContents.textContent = "none yet"; if (!contentEl.hasChildNodes()) { contentEl.replaceChildren(defaultContents); } @@ -26,7 +26,7 @@ const updateInstanceRoomInfo = () => { const listEl = docFragment.appendChild(document.createElement("ul")); for (const roomInfo of json) { const item = listEl.appendChild(document.createElement("li")); - item.innerText = roomInfo["host_username"] + " "; + item.textContent = roomInfo["host_username"] + " "; const form = item.appendChild(document.createElement("form")); form.action = roomUrl(roomInfo["room_id"]); form.target = "activity-inner-iframe"; -- cgit v1.2.3-57-g22cb