我正在使用 Electron 构建一个应用程序,并使用 Electron Builder 进行打包。当运行 Electron 时,我想通过这个command line argument: --enable-mixed-sandbox .
这可能吗?怎么办?
这个:
app.commandLine.appendSwitch('enable-mixed-sandbox')
不行 due to :
Note that it is not enough to call app.commandLine.appendSwitch('--enable-sandbox'), as electron/node startup code runs after it is possible to make changes to chromium sandbox settings. The switch must be passed to electron on the command-line:
electron --enable-sandbox app.js
It is not possible to have the OS sandbox active only for some renderers, if --enable-sandbox is enabled, normal electron windows cannot be created.
最佳答案
enable-mixed-sandbox
不是有效的 Electron 命令行标志。请参阅here对于 Electron 的所有可用命令行标志。
关于electron - 使用 Electron 构建器时如何将参数传递给 Electron ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45288492/