HistoryStates
A collections class allowing for array access into a document's history states,
while also providing familiar methods from ExtendScript, like getByName
Copied to your clipboard1// Iterate through all history states2app.activeDocument.historyStates.forEach(h => console.log(h.name));34// Find all snapshot history states5var snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)
Indexable#
â–ª [index: number]: HistoryState
Used to access the history states in the collection
Copied to your clipboard1// Iterate through all history states2app.activeDocument.historyStates.forEach(h => console.log(h.name));34// Find all snapshot history states5var snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)
Properties#
Name | Type | Access | Description |
---|---|---|---|
length | number | Read-only | Number of HistoryState elements in this collection |
parent | Document | Read-only | The owner document of this HistoryState collection |
Methods#
getByName#
Find the first history state with the matching name
Parameters#
Name | Type |
---|---|
name | string |