How can I tell if the active image needs saving - is modified?

For a UXP based plug-in that we’re developing for Adobe Photoshop, I’m trying to determine if the active image file needs to be saved. In the user interface, the document’s tab shows with an asterisk * when saving is needed because a change has been made to the image.
In ExtendScript for Adobe InDesign the DOM allows me to check the document’s .modified property. I’m looking for something similar in Adobe Photoshop with UXP. Does it exist?

saved | boolean | R | 23.0 | True if the document has been saved since the last change.

https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/document/#properties-1

2 Likes

Perfect. Thanks @Karmalakas! That uses a different meaning of .saved than the Adobe InDesign version so I probably just ignored it.
Consider this question solved.