1const button = document.getElementById('<your_button_id>');
2button.addEventListener('click', () => {
3 createBrowserWindow();
4});
5
6function createBrowserWindow() {
7 const remote = require('electron').remote;
8 const BrowserWindow = remote.BrowserWindow;
9 const win = new BrowserWindow({
10 height: 600,
11 width: 800
12 });
13
14 win.loadURL('<url>');
15}
16
1const electron = require('electron')
2const BrowserWindow = electron.remote.BrowserWindow
3
4$( "#target" ).click(function() {
5 let win = new BrowserWindow({ show: false })
6 win.on('close', function () { win = null })
7 win.loadURL("github.com")
8 win.once('ready-to-show', () => {
9 win.show()
10 })
11});
1const createWindow = () => {
2 const mainWindow = new BrowserWindow({
3 width: 800,
4 height: 400,
5 });
6 mainWindow.loadFile(path.join(__dirname, 'index.html'));
7};