If you don’t want to use innerHTML you could use document.write(newDocument);.
If the document hasn’t completely loaded, you’ll need to put document.open() as well (thanks bažmegakapa).
If you don’t want to use innerHTML you could use document.write(newDocument);.
If the document hasn’t completely loaded, you’ll need to put document.open() as well (thanks bažmegakapa).