showing results for - "electron quit app from renderer"
Hanna
29 May 2019
1// In your renderer process
2const {ipcRenderer} = require('electron');
3const closeApp = document.getElementById('closeApp');
4closeApp.addEventListener('click', () => {
5    ipcRenderer.send('close-me')
6});
7
8// In your app main process
9const {ipcMain} = require('electron')
10ipcMain.on('close-me', (evt, arg) => {
11  app.quit()
12})