Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
If I execute in browser console: document.write("Hello"); A new DOM document with the text Hello appears in the same browser window. From MDN documentation: Note: Because document.write() w...
#1: Initial revision
document.open() and the DOM tree of the loaded (closed) browser window on which it works
If I execute in browser console: ```js document.write("Hello"); ``` A new DOM document with the text _Hello_ appears in the same browser window. From [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/Document/write): > Note: Because document.write() writes to the document stream, calling document.write() on a closed (loaded) document automatically calls document.open(), which will clear the document. What is the meaning of "clear" here?<br> Does it mean "totally deleted" or is the previous DOM tree stored somewhere and can be retrieved?