mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
SDA-48 - force sandbox for all BrowserWindow instances (#814)
This commit is contained in:
parent
4bf398974c
commit
c4b0283239
@ -11,7 +11,8 @@
|
||||
"main": "lib/src/app/init.js",
|
||||
"types": "lib/src/app/init.d.ts",
|
||||
"scripts": {
|
||||
"browserify-preload": "browserify -o lib/src/renderer/_preload-main.js -x electron --insert-global-vars=__filename,__dirname lib/src/renderer/preload-main.js",
|
||||
"browserify-preload": "browserify -o lib/src/renderer/_preload-main.js -x electron --insert-global-vars=__filename,__dirname lib/src/renderer/preload-main.js && npm run browserify-preload-component",
|
||||
"browserify-preload-component": "browserify -o lib/src/renderer/_preload-component.js -x electron --insert-global-vars=__filename,__dirname lib/src/renderer/preload-component.js",
|
||||
"compile": "npm run lint && gulp build",
|
||||
"dev": "npm run prebuild && cross-env ELECTRON_DEV=true electron .",
|
||||
"demo-win": "npm run prebuild && cross-env ELECTRON_DEV=true electron . --url=file:///src/demo/index.html",
|
||||
@ -94,7 +95,7 @@
|
||||
"browserify": "16.2.3",
|
||||
"cross-env": "5.2.0",
|
||||
"del": "3.0.0",
|
||||
"electron": "6.1.2",
|
||||
"electron": "6.1.5",
|
||||
"electron-builder": "21.2.0",
|
||||
"electron-builder-squirrel-windows": "20.38.3",
|
||||
"electron-icon-maker": "0.0.4",
|
||||
|
@ -10,6 +10,9 @@ import { appStats } from './stats';
|
||||
const userDataPathArg: string | null = getCommandLineArgs(process.argv, '--userDataPath=', false);
|
||||
const userDataPath = userDataPathArg && userDataPathArg.substring(userDataPathArg.indexOf('=') + 1);
|
||||
|
||||
// force sandbox: true for all BrowserWindow instances.
|
||||
app.enableSandbox();
|
||||
|
||||
// need to set this explicitly if using Squirrel
|
||||
// https://www.electron.build/configuration/configuration#Configuration-squirrelWindows
|
||||
app.setAppUserModelId('com.symphony.electron-desktop');
|
||||
|
@ -117,7 +117,7 @@ export const createComponentWindow = (
|
||||
width: 300,
|
||||
...opts,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, '../renderer/preload-component'),
|
||||
preload: path.join(__dirname, '../renderer/_preload-component.js'),
|
||||
devTools: false,
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user