app.activeDocument.channels is Undefined

When using: app.activeDocument.channels.forEach(h => console.log(;
as this link says :

program told tha the .channels is undefined

please help
I want to get the property of this class a adobe told.

Are you using API version 2?

sorry but how do i know the version of my ap?

after the changes i’ll let you know
“manifestVersion”: 4,
“id”: “YOUR_ID_HERE”,
“name”: “Name of your plugin”,
“version”: “1.0.0”,
“main”: “index.html”,
“host”: {
“app”: “PS”,
“minVersion”: “23.0.0”,
“data” : {
“apiVersion”: 2,
“loadEvent”: “use”

ok. simple as that
thanks tomzag.

1 Like