main: add context bridge communication example via preload script, set nodeIntegration to false by default, improve security

This commit is contained in:
leejooy96 committed 2023-02-01 09:38:23 +09:00
1 parent a540caf9d3
commit 8057a3521a
9 files changed
+64 -12

No files matched your search

+1 -3
View File
@@ -1,12 +1,10 @@
import { shell } from 'electron'
export default class Utils {
static getCurrentLocale(): string {
return navigator?.language?.split('-')[0] || 'en'
}
static async openExternal(url: string): Promise<void> {
await shell.openExternal(url)
await window.mainApi.openExternal(url)
}
}