Search
 
SCRIPT & CODE EXAMPLE
 

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()
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: username regex 
Javascript :: string to JSONobject android 
Javascript :: get selected text js 
Javascript :: javascript numero al cuadrado 
Javascript :: how to get name array value checked in jquery 
Javascript :: node js load animation 
Javascript :: hello world expressjs 
Javascript :: ready function javascript 
Javascript :: express body-parser deprecated 
Javascript :: moment js add day 
Javascript :: window.ReactNativeWebView.postMessage 
Javascript :: alert confirm prompt javascript 
Javascript :: get h1 text javascript 
Javascript :: FlatList Warning: Each child in a list should have a unique "key" prop. 
Javascript :: Codewars Beginner - Reduce but Grow 
Javascript :: moment get time am pm 
Javascript :: filter using two array of objects 
Javascript :: nestjs cli create project 
Javascript :: json post fetch 
Javascript :: nodejs strict ssl false 
Javascript :: get method 
Javascript :: console regex 
Javascript :: javascript element edit value 
Javascript :: react-native-youtube-iframe android crash 
Javascript :: when I pass a variable as a function parameter, is a new copy of the variable value or a memory reference javascript 
Javascript :: jquery how to fnd id 
Javascript :: p5 js cdn 
Javascript :: how to get greatest common divisor in javascript 
Javascript :: js check if infinity 
Javascript :: Error: open failed: EACCES (Permission denied) react native 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =