Is there a way to detect when ActiveDocument was changed to another document? E.g. if I have 2 files opened and I click from one active file to another, how can my UXP plugin detect the change?
I tried to guess and check for “changed” event, but that didn’t work. It only triggered once upon loading the plugin.
require("photoshop").app.activeDocument.addEventListener("changed", showAlert("changed"));
Thank you.