chore: bump electron version to 12.0.6
* Bump electron version to 12.0.6 * Move web content clean up logic to window close event Reference from electron release notes: > Fixed the window-all-closed event being emitted while the last BrowserWindow was still in the process of being closed.
This commit is contained in:
parent
2e69c40514
commit
91776441f1
|
@ -7290,9 +7290,9 @@
|
|||
}
|
||||
},
|
||||
"electron": {
|
||||
"version": "12.0.5",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-12.0.5.tgz",
|
||||
"integrity": "sha512-z0xYB3sPr0qZcDrHUUWqooPKe3yUzBDxQcgQe3f2TLstA84JIFXBoaIJCPh/fJW0+JdF/ZFVeK2SNgLhYtRV+Q==",
|
||||
"version": "12.0.6",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-12.0.6.tgz",
|
||||
"integrity": "sha512-+fqhpdG6Fd6LzsizMdaSPC1I8tfsMT8/7fsYBgABED3hEWdus/rt6CQ54P3/EWZyQebtyHR6HXtlofUqKMV3KQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@electron/get": "^1.0.1",
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
"copy-webpack-plugin": "8.0.0",
|
||||
"css-loader": "^5.1.1",
|
||||
"devtron": "^1.4.0",
|
||||
"electron": "^12.0.5",
|
||||
"electron": "^12.0.6",
|
||||
"electron-builder": "^22.10.5",
|
||||
"electron-builder-squirrel-windows": "^22.10.5",
|
||||
"electron-debug": "^3.2.0",
|
||||
|
|
|
@ -326,6 +326,22 @@ function runApp() {
|
|||
newWindow.focus()
|
||||
})
|
||||
|
||||
newWindow.on('close', () => {
|
||||
newWindow.webContents.session.clearCache()
|
||||
newWindow.webContents.session.clearStorageData({
|
||||
storages: [
|
||||
'appcache',
|
||||
'cookies',
|
||||
'filesystem',
|
||||
'indexdb',
|
||||
'shadercache',
|
||||
'websql',
|
||||
'serviceworkers',
|
||||
'cachestorage'
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
newWindow.on('closed', () => {
|
||||
// Remove closed window
|
||||
openedWindows = openedWindows.filter((window) => window !== newWindow)
|
||||
|
@ -406,20 +422,6 @@ function runApp() {
|
|||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
|
||||
mainWindow.webContents.session.clearCache()
|
||||
mainWindow.webContents.session.clearStorageData({
|
||||
storages: [
|
||||
'appcache',
|
||||
'cookies',
|
||||
'filesystem',
|
||||
'indexdb',
|
||||
'shadercache',
|
||||
'websql',
|
||||
'serviceworkers',
|
||||
'cachestorage'
|
||||
]
|
||||
})
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
|
|
Loading…
Reference in New Issue