Translated API docs, added power-save-blocker API to README
This commit is contained in:
parent
783e4bc591
commit
dcd10d1e4b
19 changed files with 138 additions and 170 deletions
|
@ -1,20 +1,17 @@
|
|||
# ipc (main process)
|
||||
|
||||
Handles asynchronous and synchronous message sent from a renderer process (web
|
||||
page).
|
||||
랜더러 프로세스(웹 페이지)로 부터 동기 또는 비동기로 메시지를 받아 처리합니다.
|
||||
|
||||
The messages sent from a renderer would be emitted to this module, the event name
|
||||
is the `channel` when sending message. 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(...)`.
|
||||
랜더러로부터 발신된 메시지들은 모두 이 모듈에서 `channel` 이라는 특정 이벤트 이름을 통해 수신할 수 있습니다.
|
||||
동기 메시지는 `event.returnValue`를 이용하여 반환값(답장)을 설정할 수 있습니다. 비동기 메시지라면 `event.sender.send(...)`를 사용하면 됩니다.
|
||||
|
||||
It's also possible to send messages from main process to the renderer process,
|
||||
see [WebContents.send](browser-window.md#webcontentssendchannel-args) for more.
|
||||
또한 메인 프로세스에서 랜더러 프로세스로 메시지를 보내는 것도 가능합니다.
|
||||
자세한 내용은 [WebContents.send](browser-window-ko.md#webcontentssendchannel-args)를 참고 하세요.
|
||||
|
||||
An example of sending and handling messages:
|
||||
보내진 메시지들을 처리하는 예제입니다:
|
||||
|
||||
```javascript
|
||||
// In main process.
|
||||
// 메인 프로세스에서 처리.
|
||||
var ipc = require('ipc');
|
||||
ipc.on('asynchronous-message', function(event, arg) {
|
||||
console.log(arg); // prints "ping"
|
||||
|
@ -28,7 +25,7 @@ ipc.on('synchronous-message', function(event, arg) {
|
|||
```
|
||||
|
||||
```javascript
|
||||
// In renderer process (web page).
|
||||
// 랜더러 프로세스에서의 처리 (web page).
|
||||
var ipc = require('ipc');
|
||||
console.log(ipc.sendSync('synchronous-message', 'ping')); // prints "pong"
|
||||
|
||||
|
@ -42,8 +39,8 @@ ipc.send('asynchronous-message', 'ping');
|
|||
|
||||
### Event.returnValue
|
||||
|
||||
Assign to this to return an value to synchronous messages.
|
||||
동기 메시지를 설정합니다.
|
||||
|
||||
### Event.sender
|
||||
|
||||
The `WebContents` that sent the message.
|
||||
메시지를 보내온 sender `WebContents` 객체입니다.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue