document.write called on a loaded document? Reopen it and clear its contents. Yes because that makes sense and I wouldn’t want that to be an error state. Oh JavaScript.
Sure, something like a .clear or similar but the default behavior of clearing a loaded document by calling open on it is strange compared to what you would expect to happen with “normal” files/streams.
Edit to add:
I think calling write on a loaded document should have been an exceptional case and you should have had to explicitly call something to unload, replace or clear it.