Merge pull request #1481 from bhargavrpatel/patch-1

Minor grammatical fixes
This commit is contained in:
Daniel Hengeveld 2015-04-23 17:18:26 -07:00
commit b7f974f469

View file

@ -2,41 +2,35 @@
## Introduction ## Introduction
Generally, Electron enables you to create desktop applications with pure Electron enables you to create desktop applications with pure JavaScript by providing a runtime with rich native APIs. You could see it as a variant of the io.js runtime which is focused on desktop applications instead of web servers.
JavaScript by providing a runtime with rich native APIs. You could see it as
a variant of the io.js runtime which is focused on desktop applications
instead of web servers.
It doesn't mean Electron is a JavaScript binding to GUI libraries. Instead, It doesn't mean Electron is a JavaScript binding to GUI libraries. Instead,
Electron uses web pages as its GUI, so you could also see it as a minimal Electron uses web pages as its GUI, so you could also see it as a minimal
Chromium browser, controlled by JavaScript. Chromium browser, controlled by JavaScript.
### The main process ### Main process
In Electron the process that runs `package.json`'s `main` script is called In Electron, the process that runs `package.json`'s `main` script is called
__the main process__. The script runs in the main process can display GUI by __the main process__. The script that runs in the main process, can display GUI by
creating web pages. creating web pages.
### The renderer process ### Renderer process
Since Electron uses Chromium for displaying web pages, Chromium's Since Electron uses Chromium for displaying web pages, Chromium's
multi-processes architecture is also used. Each web page in Electron runs in multi-processes architecture is also used. Each web page in Electron runs in
its own process, which is called __the renderer process__. its own process, which is called __the renderer process__.
In normal browsers web pages usually run in a sandboxed environment and are not In normal browsers web pages usually run in a sandboxed environment and are not
allowed access to native resources. In Electron users have the power to use allowed access to native resources. Electron users however, have the power to use
io.js APIs in web pages and it is therefore possible to interact with low level io.js APIs in web pages allowing lower level operating system interactions.
operating system features.
### Differences between main process and renderer process ### Differences between main process and renderer process
The main process creates web pages by creating `BrowserWindow` instances, and The main process creates web pages by creating `BrowserWindow` instances. Each `BrowserWindow` instance runs the web page in its own renderer process. When a `BrowserWindow` instance is destroyed, the corresponding renderer process
each `BrowserWindow` instance runs the web page in its own renderer process,
when a `BrowserWindow` instance is destroyed, the corresponding renderer process
would also be terminated. would also be terminated.
So the main process manages all web pages and their corresponding renderer The main process manages all web pages and their corresponding renderer
processes, and each renderer process is separated from each other and only care processes, each renderer process is isolated and only cares
about the web page running in it. about the web page running in it.
In web pages, it is not allowed to call native GUI related APIs because managing In web pages, it is not allowed to call native GUI related APIs because managing