Skip to content

Commit

Permalink
fix(show-me/webframe): refactor to use current Electron security defa…
Browse files Browse the repository at this point in the history
…ults (electron#890)
  • Loading branch information
thewheat committed Nov 16, 2021
1 parent b8ab89f commit 106cd16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/show-me/webframe/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
// https://electronjs.org/docs/api/web-frame

const { app, BrowserWindow } = require('electron')
const path = require('path')

app.whenReady().then(() => {
const mainWindow = new BrowserWindow({
width: 600,
height: 600,
webPreferences: {
nodeIntegration: true
nodeIntegration: false, // default in Electron >= 5
contextIsolation: true, // default in Electron >= 12
preload: path.join(__dirname, 'preload.js')
}
})
mainWindow.loadFile('index.html')
Expand Down
File renamed without changes.

0 comments on commit 106cd16

Please sign in to comment.