diff --git a/docs/api/global-shortcut.md b/docs/api/global-shortcut.md index 52ec17326c63..f9ca654cf50a 100644 --- a/docs/api/global-shortcut.md +++ b/docs/api/global-shortcut.md @@ -4,7 +4,7 @@ The `global-shortcut` module can register/unregister a global keyboard shortcut with the operating system so that you can customize the operations for various shortcuts. -Note that the shortcut is global; it will work even if the app does +**Note**: The shortcut is global; it will work even if the app does not have the keyboard focus. You should not use this module until the `ready` event of the app module is emitted. @@ -51,7 +51,8 @@ the registered shortcut is pressed by the user. * `accelerator` [Accelerator](accelerator.md) -Returns `true` or `false` depending on whether the shortcut `accelerator` is registered. +Returns `true` or `false` depending on whether the shortcut `accelerator` is +registered. ### `globalShortcut.unregister(accelerator)` diff --git a/docs/api/ipc-main-process.md b/docs/api/ipc-main-process.md index c34564ef82ef..bbb581fcfc9b 100644 --- a/docs/api/ipc-main-process.md +++ b/docs/api/ipc-main-process.md @@ -1,6 +1,8 @@ # ipc (main process) -The `ipc` module, when used in the main process, handles asynchronous and synchronous messages sent from a renderer process (web page). Messages sent from a renderer will be emitted to this module. +The `ipc` module, when used in the main process, handles asynchronous and +synchronous messages sent from a renderer process (web page). Messages sent from +a renderer will be emitted to this module. ## Sending Messages @@ -10,7 +12,8 @@ for more information. - When sending a message, the event name is the `channel`. - To reply a synchronous message, you need to set `event.returnValue`. -- To send an asynchronous back to the sender, you can use `event.sender.send(...)`. +- To send an asynchronous back to the sender, you can use + `event.sender.send(...)`. An example of sending and handling messages between the render and main processes: @@ -40,9 +43,9 @@ ipc.on('asynchronous-reply', function(arg) { ipc.send('asynchronous-message', 'ping'); ``` -## Methods +## Listening for Messages -The `ipc` module has the following method: +The `ipc` module has the following method to listen for events: ### `ipc.on(channel, callback)` diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index 4a5995663884..12cd11aec777 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -2,7 +2,7 @@ The `ipc` module provides a few methods so you can send synchronous and asynchronous messages from the render process (web page) to the main process. -You can also receive messages returned from the main process. +You can also receive replies from the main process. **Note**: If you want to make use of modules in the main process from the renderer process, you might consider using the [remote](remote.md) module.