From: Weiqiang Lin <23leo@163.com> Date: Sun, 22 Jan 2017 06:16:59 +0000 (+0800) Subject: Supported Chrome Command Line Switches to zh-CN X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64a1b1c474b766668b7c3c6ae1006f88b7b0b6ca;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Supported Chrome Command Line Switches to zh-CN --- diff --git a/docs-translations/zh-CN/api/chrome-command-line-switches.md b/docs-translations/zh-CN/api/chrome-command-line-switches.md index 6b60179..976a617 100644 --- a/docs-translations/zh-CN/api/chrome-command-line-switches.md +++ b/docs-translations/zh-CN/api/chrome-command-line-switches.md @@ -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', ';*.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