Restarted Inkdrop.
At startup, no alert were generated. Just I assumed.
I am in a Windows environment, so I clicked on the X symbol in the upper right corner.
At this moment, I would like to seen an alert occur. However, Inkdrop exits without anything occurring…
I have experience creating color themes for Inkdrop, but this is my first time developing an extension.
Great to hear that you are trying to create a plugin!
So, you want to display a dialog when quitting the app.
You have to understand the concept of the renderer processes and main processes.
Plugins run on the renderer processes, and the onAppQuit event handler receives an event before-quit from the main process.
You can subscribe to this event but can’t prevent the app from quitting from your event handler, since the main process can’t know it.
Instead, you can prevent the window from closing by doing something like so:
Thank you very match
I did not understand how Electron works. I was able to run it with the code you wrote. I have closing apps by mistake, so I try to show the exit confirmation dialog for other apps as well.
I will do my best to release the plugin. Thank you