Right click this window and select "view source" in order to copy the source for this script.
Document Open()
View the source before you click the button...
This has at least a few practical uses and will replace the current page with the written object; a new document on the fly. Having a dedicated use for this is rare.