revert()
Reverts the document to its last saved state. If the current document is not saved yet, this function will close the document without saving it and reopen a fresh document so as to “revert” the unsaved document. This function is helpful during development stage to start from a new or default document each time the script is run.
Type: function
Returns:
-
{Document}:
The reverted document.