Skip to main content

REPL

Read-Eval-Print-Loop (REPL) is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user.Read Eval Print Loop(REPL)是一个简单的交互式计算机编程环境,它接受单个用户输入(即单个表达式),对其进行评估,并将结果返回给用户。

Main process主要工艺流程

Electron exposes the Node.js repl module through the --interactive CLI flag. Electron通过--interactive CLI标志公开Node.js repl 模块Assuming you have electron installed as a local project dependency, you should be able to access the REPL with the following command:假设您已将electron安装为本地项目依赖项,您应该能够使用以下命令访问REPL:

./node_modules/.bin/electron --interactive

Note: electron --interactive is not available on Windows (see electron/electron#5776 for more details).在Windows上不可用(有关详细信息,请参阅electron/electron#5776)。

Renderer process渲染器进程

You can use the DevTools Console tab to get a REPL for any renderer process. 您可以使用DevTools控制台选项卡获取任何渲染器进程的REPL。To learn more, read the Chrome documentation.要了解更多信息,请阅读Chrome文档