addEventListener gone after appending innerHTML
Any time you set the innerHTML property you are overwriting any previous HTML that was set there. This includes concatenation assignment, because element.innerHTML += ‘<b>Hello</b>’; is the same as writing element.innerHTML = element.innerHTML + ‘<b>Hello</b>’; This means all handlers not attached via HTML attributes will be “detached”, since the elements they were attached to no … Read more