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");