I have tried the following code to close a frameless window in Electron JS. But the window does not close when button is clicked. I am new for Electron, I am stuck here now.
const electron = require('electron');
const path = require('path');
const remote = electron.remote;
const closeBtn = document.getElementById('closeBtn');
closeBtn.addEventListener('click', function(event) {
var window = remote.getCurrentWindow();
window.close();
});
Please tell me what I am supposed to do now. Thanks in advance...