If document.write() is used on a closed document, document.open() is automatically called.
This will delete existing content.