Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

electron open new window

const button = document.getElementById('<your_button_id>');
button.addEventListener('click', () => {
  createBrowserWindow();
});

function createBrowserWindow() {
  const remote = require('electron').remote;
  const BrowserWindow = remote.BrowserWindow;
  const win = new BrowserWindow({
    height: 600,
    width: 800
  });

  win.loadURL('<url>');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #electron #open #window
ADD COMMENT
Topic
Name
4+3 =