docs: update the macos Dock Instructions (#29197)

* Update the macos Dock Instructions

* Remove preload and ;'s

* Mixed ;s

* Update dock doc

* Add informational text to index.html
This commit is contained in:
Tony Ferrell 2021-05-18 18:03:13 -07:00 committed by GitHub
parent 5656493676
commit 071fa2ab8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 31 additions and 14 deletions

View file

@ -4,9 +4,6 @@ function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}
})
win.loadFile('index.html')
@ -27,7 +24,9 @@ const dockMenu = Menu.buildFromTemplate([
])
app.whenReady().then(() => {
app.dock.setMenu(dockMenu)
if (process.platform === 'darwin') {
app.dock.setMenu(dockMenu)
}
}).then(createWindow)
app.on('window-all-closed', () => {