docs: windows don't need to be retained (#21957)

This commit is contained in:
Jeremy Apthorp 2020-01-30 14:15:35 -08:00 committed by GitHub
parent 23382e6e08
commit 662b94f46e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 25 deletions

View file

@ -11,10 +11,7 @@ const { BrowserWindow } = require('electron')
// Or use `remote` from the renderer process.
// const { BrowserWindow } = require('electron').remote
let win = new BrowserWindow({ width: 800, height: 600 })
win.on('closed', () => {
win = null
})
const win = new BrowserWindow({ width: 800, height: 600 })
// Load a remote URL
win.loadURL('https://github.com')