From a61c94ed8ed4abcee56d767d5a1d305f34ea810e Mon Sep 17 00:00:00 2001 From: TopG Date: Tue, 16 Apr 2024 11:01:12 +0200 Subject: [PATCH] Replaced innerHTML with innerText in scripts/main.js --- scripts/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/main.js b/scripts/main.js index 52ab21d..8e67091 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -30,7 +30,7 @@ if(!localStorage.getItem('name')) { setUserName(); } else { let storedName = localStorage.getItem('name'); - myHeading.innerHTML = 'Mozilla is cool, ' + storedName; + myHeading.innerText = 'Mozilla is cool, ' + storedName; // you can use also innerHTML(unsafe compared to innerText and textContent) and textContent } myButton.onclick = function() {