quickbuild
Version:
A mature, feature-complete application generator with an emphasis on speed
14 lines (10 loc) • 423 B
JavaScript
const {BrowserWindow} = require('electron').remote
const path = require('path')
const newWindowBtn = document.getElementById('new-window')
newWindowBtn.addEventListener('click', (event) => {
const modalPath = path.join('file://', __dirname, '../../sections/windows/modal.html')
let win = new BrowserWindow({ width: 400, height: 320 })
win.on('close', () => { win = null })
win.loadURL(modalPath)
win.show()
})