Atom Electron – Close the window with javascript
You must access the BrowserWindow object created by your main process and call the minimize, maximize, and close methods on that. You can access this using the remote module. Here is an example of binding all three buttons: const remote = require(‘electron’).remote; document.getElementById(“min-btn”).addEventListener(“click”, function (e) { var window = remote.getCurrentWindow(); window.minimize(); }); document.getElementById(“max-btn”).addEventListener(“click”, function (e) … Read more