Close app from jQuery listener


I am looking to close the application when the user interacts with a DOM element using jQuery. If I try to jquery from main.js I get jQuery not defined and if I try to reference app from my loaded app.js file I get app is not defined.

$('#element').on('click', function( {


Check out the remote module.


Wouldn’t work for some reason, went with ipc instead. I like that it keeps the renderer and the main process separate in concern.


you should do a call using ipc to the main js file, over there you kill the app, not on BrowserWindow.