Event Listeners
Photoshop emits various event notifications when a user is actively interacting with the application.
During development of your plugin, you can use app.eventNotifier to enumerate all the event types you'd like to be notified about.
In a production environment, this 'catch-all' notifier is unavailable to you. Once you've created a list of key events you'd like to be notified of, use the following action API to register a listener:
Copied to your clipboard1var listener = (e,d) => { console.log(e,d); }2require('photoshop').action.addNotificationListener([3 {4 event: "select"5 },6 {7 event: "open"8 } // any other events...9], listener);