From b797804fd92a3bed68223f63434ed3d63ba0f349 Mon Sep 17 00:00:00 2001 From: Jessica Lord Date: Fri, 4 Sep 2015 13:44:40 -0700 Subject: [PATCH] Use "in" over "on" --- docs/api/auto-updater.md | 2 +- docs/api/power-monitor.md | 2 +- docs/api/synopsis.md | 4 ++-- docs/api/web-contents.md | 4 ++-- docs/styleguide.md | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index 3901e1be..9734f592 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -53,7 +53,7 @@ server that you are requesting updates from. A common approach is to use query parameters, like this: ```javascript -// On the main process +// In the main process var app = require('app'); var autoUpdater = require('auto-updater'); autoUpdater.setFeedUrl('http://mycompany.com/myapp/latest?version=' + app.getVersion()); diff --git a/docs/api/power-monitor.md b/docs/api/power-monitor.md index c9a33cc1..6ffb910e 100644 --- a/docs/api/power-monitor.md +++ b/docs/api/power-monitor.md @@ -1,7 +1,7 @@ # power-monitor The `power-monitor` module is used to monitor power state changes. You can -only use it on the main process. You should not use this module until the `ready` +only use it in the main process. You should not use this module until the `ready` event of the `app` module is emitted. For example: diff --git a/docs/api/synopsis.md b/docs/api/synopsis.md index 21f4ff2a..85d9e3f8 100644 --- a/docs/api/synopsis.md +++ b/docs/api/synopsis.md @@ -5,13 +5,13 @@ Electron and third-party node modules also fully supported as well (including the [native modules](../tutorial/using-native-node-modules.md)). Electron also provides some extra built-in modules for developing native -desktop applications. Some modules are only available on the main process, some +desktop applications. Some modules are only available in the main process, some are only available in the renderer process (web page), and some can be used in both processes. The basic rule is: if a module is [GUI](https://en.wikipedia.org/wiki/Graphical_user_interface) or low-level -system related, then it should be only available on the main process. You need +system related, then it should be only available in the main process. You need to be familiar with the concept of [main process vs. renderer process](../tutorial/quick-start.md#the-main-process) scripts to be able to use those modules. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 89afae43..c49b6474 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -445,7 +445,7 @@ page can handle it by listening to the `channel` event of the `ipc` module. An example of sending messages from the main process to the renderer process: ```javascript -// On the main process. +// In the main process. var window = null; app.on('ready', function() { window = new BrowserWindow({width: 800, height: 600}); @@ -472,6 +472,6 @@ app.on('ready', function() { **Note:** 1. The IPC message handler in web pages does not have an `event` parameter, - which is different from the handlers on the main process. + which is different from the handlers in the main process. 2. There is no way to send synchronous messages from the main process to a renderer process, because it would be very easy to cause dead locks. diff --git a/docs/styleguide.md b/docs/styleguide.md index 23c590e6..687b5c4d 100644 --- a/docs/styleguide.md +++ b/docs/styleguide.md @@ -25,6 +25,7 @@ These are the ways that we construct the Electron documentation. - Line length is 80-column wrapped. - Platform specific methods are noted in italics following method header. - ```### `method(foo, bar)` _OS X_``` +- Prefer 'in the ___ process' over 'on' ## Reading Electron Documentation -- 2.43.0