mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: only allow bundled preload scripts (#17308)
This commit is contained in:
committed by
Alexey Kuzmin
parent
3d307e5610
commit
8cf15cc931
@@ -193,7 +193,7 @@ const mainWindow = new BrowserWindow({
|
||||
webPreferences: {
|
||||
nodeIntegration: false,
|
||||
nodeIntegrationInWorker: false,
|
||||
preload: './preload.js'
|
||||
preload: path.join(app.getAppPath(), 'preload.js')
|
||||
}
|
||||
})
|
||||
|
||||
@@ -260,7 +260,7 @@ very small investment.
|
||||
const mainWindow = new BrowserWindow({
|
||||
webPreferences: {
|
||||
contextIsolation: true,
|
||||
preload: 'preload.js'
|
||||
preload: path.join(app.getAppPath(), 'preload.js')
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user