Skip to content

Instantly share code, notes, and snippets.

@imansigupta
Created June 16, 2020 18:23
Show Gist options
  • Save imansigupta/952a134233853bce146c6f396f9104c6 to your computer and use it in GitHub Desktop.
Save imansigupta/952a134233853bce146c6f396f9104c6 to your computer and use it in GitHub Desktop.
const { app, BrowserWindow, ipcMain } = require('electron');
//ipcMain.on will receive the “btnclick” info from renderprocess
ipcMain.on("btnclick", function(event, arg) {
var url = "https://www.google.com";
// inform the render process that the assigned task finished.
// event.sender.send in ipcMain will return the reply to renderprocess
event.sender.send("btnclick-task-finished", url);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment