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 clipboardvar listener = (e,d) => { console.log(e,d); }require('photoshop').action.addNotificationListener([{event: "select"},{event: "open"} // any other events...], listener);
