File tree 4 files changed +12
-10
lines changed
4 files changed +12
-10
lines changed Original file line number Diff line number Diff line change 41
41
"nodemon" : " ^2.0.7" ,
42
42
"style-loader" : " ^2.0.0" ,
43
43
"underscore.string" : " ^3.3.5" ,
44
- "webpack" : " ^5.24.2 " ,
44
+ "webpack" : " ^5.24.3 " ,
45
45
"webpack-inject-plugin" : " ^1.5.5" ,
46
46
"webpack-merge" : " ^5.7.3"
47
47
},
Original file line number Diff line number Diff line change 2
2
// Preload File that should be loaded into browser window instead of
3
3
// setting nodeIntegration: true for browser window
4
4
5
- import { ipcRenderer } from 'electron'
5
+ import { contextBridge , ipcRenderer } from 'electron'
6
6
7
- window . onLoaded = callback => {
8
- ipcRenderer . on ( 'loaded' , callback )
9
- }
7
+ contextBridge . exposeInMainWorld ( 'MessagesAPI' , {
8
+ onLoaded : callback => {
9
+ ipcRenderer . on ( 'loaded' , callback )
10
+ }
11
+ } )
Original file line number Diff line number Diff line change 1
1
require ( 'application.css' )
2
2
3
- window . onLoaded ( ( _ , data ) => {
3
+ window . MessagesAPI . onLoaded ( ( _ , data ) => {
4
4
document . getElementById ( 'title' ) . innerHTML = data . appName + ' App'
5
5
document . getElementById ( 'details' ) . innerHTML = 'built with Electron v' + data . electronVersion
6
6
document . getElementById ( 'versions' ) . innerHTML = 'running on Node v' + data . nodeVersion + ' and Chromium v' + data . chromiumVersion
Original file line number Diff line number Diff line change @@ -7926,10 +7926,10 @@ webpack-sources@^2.1.1:
7926
7926
source-list-map "^2.0.1"
7927
7927
source-map "^0.6.1"
7928
7928
7929
- webpack@^5.24.2 :
7930
- version "5.24.2 "
7931
- resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.2 .tgz#33790dad631e8b639f4246d762e257720875fe54 "
7932
- integrity sha512-uxxKYEY4kMNjP+D2Y+8aw5Vd7ar4pMuKCNemxV26ysr1nk0YDiQTylg9U3VZIdkmI0YHa0uC8ABxL+uGxGWWJg ==
7929
+ webpack@^5.24.3 :
7930
+ version "5.24.3 "
7931
+ resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.24.3 .tgz#6ec0f5059f8d7c7961075fa553cfce7b7928acb3 "
7932
+ integrity sha512-x7lrWZ7wlWAdyKdML6YPvfVZkhD1ICuIZGODE5SzKJjqI9A4SpqGTjGJTc6CwaHqn19gGaoOR3ONJ46nYsn9rw ==
7933
7933
dependencies :
7934
7934
" @types/eslint-scope" " ^3.7.0"
7935
7935
" @types/estree" " ^0.0.46"
You can’t perform that action at this time.
0 commit comments