11// Modules to control application life and create native browser window
2- const { app, BrowserWindow} = require ( ' electron' )
3- const path = require ( ' path' )
2+ const { app, BrowserWindow } = require ( " electron" )
3+ const path = require ( " path" )
44
5- function createWindow ( ) {
5+ function createWindow ( ) {
66 // Create the browser window.
77 const mainWindow = new BrowserWindow ( {
88 width : 800 ,
99 height : 600 ,
1010 webPreferences : {
11- preload : path . join ( __dirname , ' preload.js' ) ,
12- webviewTag : true
13- }
11+ preload : path . join ( __dirname , " preload.js" ) ,
12+ webviewTag : true ,
13+ } ,
1414 } )
1515
1616 // and load the index.html of the app.
17- mainWindow . loadFile ( ' ./index.html' )
17+ mainWindow . loadFile ( " ./index.html" )
1818
1919 // Open the DevTools.
2020 // mainWindow.webContents.openDevTools()
@@ -26,7 +26,7 @@ function createWindow () {
2626app . whenReady ( ) . then ( ( ) => {
2727 createWindow ( )
2828
29- app . on ( ' activate' , function ( ) {
29+ app . on ( " activate" , function ( ) {
3030 // On macOS it's common to re-create a window in the app when the
3131 // dock icon is clicked and there are no other windows open.
3232 if ( BrowserWindow . getAllWindows ( ) . length === 0 ) createWindow ( )
@@ -36,8 +36,8 @@ app.whenReady().then(() => {
3636// Quit when all windows are closed, except on macOS. There, it's common
3737// for applications and their menu bar to stay active until the user quits
3838// explicitly with Cmd + Q.
39- app . on ( ' window-all-closed' , function ( ) {
40- if ( process . platform !== ' darwin' ) app . quit ( )
39+ app . on ( " window-all-closed" , function ( ) {
40+ if ( process . platform !== " darwin" ) app . quit ( )
4141} )
4242
4343// In this file you can include the rest of your app's specific main process
0 commit comments