Supported Chrome Command Line Switches to zh-CN
This commit is contained in:
parent
cf54c4cbb2
commit
64a1b1c474
1 changed files with 8 additions and 4 deletions
|
@ -1,13 +1,15 @@
|
|||
# 支持的 Chrome 命令行开关
|
||||
|
||||
这页列出了Chrome浏览器和Electron支持的命令行开关. 你也可以在[app][app]模块的[ready][ready]事件发出之前使用[app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的main脚本里面:
|
||||
> Electron 支持的命令行开关。
|
||||
|
||||
你可以在 [app][app] 模块的 [ready][ready] 事件发出之前使用 [app.commandLine.appendSwitch][append-switch] 来添加它们到你应用的 main 脚本里面:
|
||||
|
||||
```javascript
|
||||
const app = require('electron').app
|
||||
const {app} = require('electron')
|
||||
app.commandLine.appendSwitch('remote-debugging-port', '8315')
|
||||
app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1')
|
||||
|
||||
app.on('ready', function () {
|
||||
app.on('ready', () => {
|
||||
// Your code here
|
||||
})
|
||||
```
|
||||
|
@ -30,7 +32,7 @@ app.on('ready', function () {
|
|||
|
||||
## --js-flags=`flags`
|
||||
|
||||
指定引擎过渡到 JS 引擎.
|
||||
指定引擎过渡到 JS 引擎.
|
||||
|
||||
在启动Electron时,如果你想在主进程中激活 `flags` ,它将被转换.
|
||||
|
||||
|
@ -138,3 +140,5 @@ app.commandLine.appendSwitch('proxy-bypass-list', '<local>;*.google.com;*foo.com
|
|||
[append-switch]: app.md#appcommandlineappendswitchswitch-value
|
||||
[ready]: app.md#event-ready
|
||||
[play-silent-audio]: https://github.com/atom/atom/pull/9485/files
|
||||
[debugging-main-process]: ../tutorial/debugging-main-process.md
|
||||
[node-cli]: https://nodejs.org/api/cli.html
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue