Asynchronously save document.
document
document must belong to window. If you need the result of the operation, use commands_save_document_async.
window
a Window.
the Document to save.