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

Properties

NameTypeAccessMin VersionDescription
length
number
R
22.5
Number of HistoryState elements in this collection.
parent
Document
R
22.5
The owner document of this HistoryState collection.

Methods

getByName

22.5

HistoryState

Find the first history state with the matching name.

Parameters

NameType
name
string
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.