app.activeDocument.channels is Undefined

When using: app.activeDocument.channels.forEach(h => console.log(h.name));
as this link says : https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/channels/

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?

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

ok.
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

face palm
I’m reminded, again, always check the dev forum…