The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.
Electronアプリ起動時に「The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron.」メッセージが表示されたらcontextIsolation: trueを設定すれば解決します。
Web側とローカル側でコンテキストを別にしておいた方がセキュアだからだそうです。
BrowserWindow
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true,
contextIsolation: true // 追加
}
})
BrowserView
const view = new BrowserView({
webPreferences: {
contextIsolation: true // 追加
}
})
BrowserWindowやBrowserViewでこのメッセージが表示されるようです。

KHI入社して退社。今はCONFRAGEで正社員です。関西で140-170/80~120万から受け付けております^^
得意技はJS(ES20xx),Java,AWSの大体のリソースです
コメントはやさしくお願いいたします^^
座右の銘は、「狭き門より入れ」「願わくは、我に七難八苦を与えたまえ」です^^


コメント