In one website, I have appended HTML to the
innerHTML ( which was a mistake and I should have used
newHTML = document.querySelector("body"); newHTML.innerHTML +=` <!-- --> `;
I have learned that
innerHTML (when used on the
<body> tag), makes all event listeners ineffective.
Indeed, even that most minor HTML change to the body tag with
innerHTML prevented me to listen to the click event on a “burger” navigation menu of that website until refreshing the page.
Would you have anything to add upon my conclusion?