function getFooter(footerPath) { if (footerPath === undefined) { footerPath = "/footer.html" } //footer = await fetch(footerPath); //footer = await footer.text(); // I have to use XMLHttpRequest for some godforsaken reason (to support IE) var req = new XMLHttpRequest() var onload = function() { document.getElementById("footer").innerHTML = this.responseText; } req.addEventListener("load", onload) req.open("GET", window.location.origin + footerPath) req.send() }