electron/docs/fiddles/windows/manage-windows/new-window/renderer.js
Milan Burda 08bbff5361
docs: handle opening links in the default browser in main.js (part #2) (#39473)
docs: handle opening links in the default browser in main.js
2023-08-14 10:04:29 +02:00

8 lines
266 B
JavaScript

const { ipcRenderer } = require('electron')
const newWindowBtn = document.getElementById('new-window')
newWindowBtn.addEventListener('click', (event) => {
const url = 'https://electronjs.org'
ipcRenderer.send('new-window', { url, width: 400, height: 320 })
})