Is it possible to appendChild(index.html) ?
I know it's possible to do this:
fetch(`${htmlFile}`)
.then((res) => {
if (res.ok) {
return res.text();
}
})
.then((htmlSnippet) => {
targetElement.innerHTML = htmlSnippet;
});
But for some reason, the changed HTML of targetElement doesn't react to any of my other javascript functions.