Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

electron quit app from renderer

// In your renderer process
const {ipcRenderer} = require('electron');
const closeApp = document.getElementById('closeApp');
closeApp.addEventListener('click', () => {
    ipcRenderer.send('close-me')
});

// In your app main process
const {ipcMain} = require('electron')
ipcMain.on('close-me', (evt, arg) => {
  app.quit()
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #electron #quit #app #renderer
ADD COMMENT
Topic
Name
9+8 =