Or you can try this.
alert(app.menuActions.itemByName("$ID/Revert").enabled)
if it returns true then the document has the unsaved changes.
Regards,
Chinna
Or you can try this.
alert(app.menuActions.itemByName("$ID/Revert").enabled)
if it returns true then the document has the unsaved changes.
Regards,
Chinna