I was creating a page to substitude another in a project and I couldn't quite find anything to do this. So when i came out with the solution I decided I had to post it online.
Very easy stopping the window load, and then appending an iframe wich covers the whole page.
window.stop();
document.documentElement.innerHTML = "<head></head><body></body>";
const doc = await fetch("").then(response => response.text());
const item = document.createElement("iframe");
item.srcdoc = doc;
item.style = "position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none;"
document.body.appendChild(item);
item.focus();