Edit in GitHubLog an issue

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 clipboard
1// Iterate through all history states
2app.activeDocument.historyStates.forEach(h => console.log(h.name));
3
4// Find all snapshot history states
5var snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)

Indexable

▪ [index: number]: HistoryState

Used to access the history states in the collection.

Copied to your clipboard
1// Iterate through all history states
2app.activeDocument.historyStates.forEach(h => console.log(h.name));
3
4// Find all snapshot history states
5var snapshots = app.activeDocument.historyStates.filter(h => h.snapshot)

Properties

名称类型访问最低版本描述
lengthnumberR22.5Number of HistoryState elements in this collection.
parentDocumentR22.5The owner document of this HistoryState collection.

Methods

getByName

22.5

HistoryState

Find the first history state with the matching name.

Parameters

名称类型
namestring
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.