Last active
June 16, 2020 18:13
-
-
Save imansigupta/f2c6f3730d871482477c645724e9ecea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ipcRenderer = require('electron').ipcRenderer; | |
const btnclick = document.getElementById('activate_button'); | |
btnclick.addEventListener('click', function() { | |
var arg = "secondparam"; | |
ipcRenderer.send("btnclick", arg); // ipcRender.send will pass the information to main process | |
}); | |
ipcRenderer.on('btnclick-task-finished', function(event, param) { | |
console.log(param) | |
document.getElementById("message").innerHTML += param; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment