Commit d0f6c31 1 parent 1652b8d commit d0f6c31 Copy full SHA for d0f6c31
File tree 2 files changed +17
-3
lines changed
2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,14 @@ app.on('window-all-closed', () => {
18
18
app . on ( 'ready' , ( ) => {
19
19
mainWindow = new BrowserWindow ( {
20
20
width : 800 ,
21
- height : 600
21
+ height : 600 ,
22
+ // Note: The following line turns off Node integration to allow
23
+ // jQuery to work properly. If you need Node integration, please
24
+ // see the Electron FAQ for how to enable this:
25
+ // http://electron.atom.io/docs/faq/
26
+ webPreferences : {
27
+ nodeIntegration : false
28
+ }
22
29
} ) ;
23
30
24
31
mainWindow . loadURL ( `file://${ __dirname } /index.html` ) ;
Original file line number Diff line number Diff line change @@ -18,14 +18,21 @@ app.on('window-all-closed', () => {
18
18
app . on ( 'ready' , ( ) => {
19
19
mainWindow = new BrowserWindow ( {
20
20
width : 800 ,
21
- height : 600
21
+ height : 600 ,
22
+ // Note: The following line turns off Node integration to allow
23
+ // jQuery to work properly. If you need Node integration, please
24
+ // see the Electron FAQ for how to enable this:
25
+ // http://electron.atom.io/docs/faq/
26
+ webPreferences : {
27
+ nodeIntegration : false
28
+ }
22
29
} ) ;
23
30
24
31
mainWindow . loadURL ( `file://${ __dirname } /index.html` ) ;
25
32
mainWindow . webContents . on ( 'did-finish-load' , ( ) => {
26
33
mainWindow . setTitle ( app . getName ( ) ) ;
27
34
} ) ;
28
-
35
+
29
36
mainWindow . on ( 'closed' , ( ) => {
30
37
mainWindow = null ;
31
38
} ) ;
You can’t perform that action at this time.
0 commit comments