I am porting a cep extension to UXP. It used
app.activeDocument.selection.bounds in a try-catch block to check whether there was actually a selection present.
The documentation mentions a selection class (https://www.adobe.io/photoshop/uxp/ps_reference/classes/selection/), but I have not found any way to access it. (
require("photoshop").app.activedocument.selection evaluates to undefined)
What would be the proper way to perform this kind of check in Photoshop UXP?