Search
 
SCRIPT & CODE EXAMPLE
 

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>');
}
Comment

electron new window

const electron = require('electron')
const BrowserWindow = electron.remote.BrowserWindow

$( "#target" ).click(function() {
	let win = new BrowserWindow({ show: false })
	win.on('close', function () { win = null })
	win.loadURL("github.com")
	win.once('ready-to-show', () => {
  		win.show()
	})
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: js first letter to uppercase 
Javascript :: how to convert string into blob in javascript 
Javascript :: count array in javascript 
Javascript :: es6 remove empty property from object 
Javascript :: node js cron example 
Javascript :: reverse a number in javascript w3schools 
Javascript :: ajax load document ready 
Javascript :: how to change color of font in js 
Javascript :: Regular expression: Match everything after a particular word 
Javascript :: javascript style multiple properties 
Javascript :: react history go back 
Javascript :: convert string in ethers.js 
Javascript :: like knex 
Javascript :: Checking Empty JS Object 
Javascript :: javascript take first element of array 
Javascript :: js reverse nested array 
Javascript :: TypeError: client.guilds.forEach is not a function 
Javascript :: spread operator merge objects 
Javascript :: how to change the color of error message in jquery validation 
Javascript :: get element ref react 
Javascript :: javascript convert character to ascii 
Javascript :: find Array of value in JSON 
Javascript :: load a config file discordjs 
Javascript :: javascript onsubmit 
Javascript :: how to fix header on scroll 
Javascript :: dockerfile copy ignore node_modules 
Javascript :: tailwind hover dont work 
Javascript :: array of objects to array 
Javascript :: sort object by key value javascript 
Javascript :: make first letter capital 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =