A collections class allowing for array access into a document's history states, while also providing familiar methods from ExtendScript, like getByName
getByName
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/historystates/
// Iterate through all history statesapp.activeDocument.historyStates.forEach(h => console.log(h.name));// Find all snapshot history statesvar snapshots = app.activeDocument.historyStates.filter(h => h.snapshot) Copy
// Iterate through all history statesapp.activeDocument.historyStates.forEach(h => console.log(h.name));// Find all snapshot history statesvar snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)
Used to access the history states in the collection.
22.5
Number of HistoryState elements in this collection.
The owner document of this HistoryState collection.
Find the first history state with the matching name.
A collections class allowing for array access into a document's history states, while also providing familiar methods from ExtendScript, like
getByNameSee
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/historystates/
Example