parent.ports.reset();
parent.ports.document.getElementById('overview').innerHTML = name + " @" + IP;
reset() line causes the line after it not work. I know this because I commented it out and now it works. I’m pretty tired and I have no idea how this can possibly be happening.
What libraries are you working with (Discord?) and what is parent.ports in this context?
My one idea is that if parent.ports.reset() literally resets the state of the ports object then maybe it doesn’t have a document property afterwards. In between the two lines, you could console.log(parent.ports);
So basically, this is a static website made up of frames (I know they are deprecated but they suit me too well) and parent.ports.reset() is telling to call the function reset() I wrote in the frame “ports.html”