Merge branch 'master' of https://github.com/preco21/electron into preco21-master
Conflicts: docs/api/browser-window-ko.md
This commit is contained in:
		
				commit
				
					
						01921ee6fa
					
				
			
		
					 32 changed files with 772 additions and 2163 deletions
				
			
		| 
						 | 
				
			
			@ -2,6 +2,7 @@
 | 
			
		|||
 | 
			
		||||
[](https://travis-ci.org/atom/electron)
 | 
			
		||||
[](https://david-dm.org/atom/electron#info=devDependencies)
 | 
			
		||||
[](http://atom-slack.herokuapp.com/)
 | 
			
		||||
 | 
			
		||||
### [Electron](https://github.com/atom/electron/) 한국어 참조문서
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +35,7 @@ npm install electron-prebuilt --save-dev
 | 
			
		|||
## 참조문서
 | 
			
		||||
 | 
			
		||||
[docs](https://github.com/atom/electron/tree/master/docs/README-ko.md) 에 프레임워크 사용 가이드와 API 레퍼런스가 있습니다.
 | 
			
		||||
추가적으로 Electron을 빌드 하는 방법과 프로젝트에 기여하는 방법도 문서에 포함되어 있으니 참고하기 바랍니다.
 | 
			
		||||
추가적으로 Electron을 빌드 하는 방법과 프로젝트에 기여하는 방법이 문서에 포함되어 있으니 참고하시기 바랍니다.
 | 
			
		||||
 | 
			
		||||
## 커뮤니티
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,317 +0,0 @@
 | 
			
		|||
# app
 | 
			
		||||
 | 
			
		||||
The `app` module is responsible for controlling the application's life time.
 | 
			
		||||
 | 
			
		||||
The example of quitting the whole application when the last window is closed:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var app = require('app');
 | 
			
		||||
app.on('window-all-closed', function() {
 | 
			
		||||
  app.quit();
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Event: will-finish-launching
 | 
			
		||||
 | 
			
		||||
Emitted when application has done basic startup. On Windows and Linux it is the
 | 
			
		||||
same with `ready` event, on OS X this event represents the
 | 
			
		||||
`applicationWillFinishLaunching` message of `NSApplication`, usually you would
 | 
			
		||||
setup listeners to `open-file` and `open-url` events here, and start the crash
 | 
			
		||||
reporter and auto updater.
 | 
			
		||||
 | 
			
		||||
Under most cases you should just do everything in `ready` event.
 | 
			
		||||
 | 
			
		||||
## Event: ready
 | 
			
		||||
 | 
			
		||||
Emitted when Electron has done everything initialization.
 | 
			
		||||
 | 
			
		||||
## Event: window-all-closed
 | 
			
		||||
 | 
			
		||||
Emitted when all windows have been closed.
 | 
			
		||||
 | 
			
		||||
This event is only emitted when the application is not going to quit. If a
 | 
			
		||||
user pressed `Cmd + Q`, or the developer called `app.quit()`, Electron would
 | 
			
		||||
first try to close all windows and then emit the `will-quit` event, and in
 | 
			
		||||
this case the `window-all-closed` would not be emitted.
 | 
			
		||||
 | 
			
		||||
## Event: before-quit
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
 | 
			
		||||
Emitted before the application starts closing its windows.
 | 
			
		||||
Calling `event.preventDefault()` will prevent the default behaviour, which is
 | 
			
		||||
terminating the application.
 | 
			
		||||
 | 
			
		||||
## Event: will-quit
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
 | 
			
		||||
Emitted when all windows have been closed and the application will quit.
 | 
			
		||||
Calling `event.preventDefault()` will prevent the default behaviour, which is
 | 
			
		||||
terminating the application.
 | 
			
		||||
 | 
			
		||||
See description of `window-all-closed` for the differences between `will-quit`
 | 
			
		||||
and it.
 | 
			
		||||
 | 
			
		||||
## Event: quit
 | 
			
		||||
 | 
			
		||||
Emitted when application is quitting.
 | 
			
		||||
 | 
			
		||||
## Event: open-file
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `path` String
 | 
			
		||||
 | 
			
		||||
Emitted when user wants to open a file with the application, it usually happens
 | 
			
		||||
when the application is already opened and then OS wants to reuse the
 | 
			
		||||
application to open file. But it is also emitted when a file is dropped onto the
 | 
			
		||||
dock and the application is not yet running. Make sure to listen to open-file
 | 
			
		||||
very early in your application startup to handle this case (even before the
 | 
			
		||||
`ready` event is emitted).
 | 
			
		||||
 | 
			
		||||
You should call `event.preventDefault()` if you want to handle this event.
 | 
			
		||||
 | 
			
		||||
## Event: open-url
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `url` String
 | 
			
		||||
 | 
			
		||||
Emitted when user wants to open a URL with the application, this URL scheme
 | 
			
		||||
must be registered to be opened by your application.
 | 
			
		||||
 | 
			
		||||
You should call `event.preventDefault()` if you want to handle this event.
 | 
			
		||||
 | 
			
		||||
## Event: activate-with-no-open-windows
 | 
			
		||||
 | 
			
		||||
Emitted when the application is activated while there is no opened windows. It
 | 
			
		||||
usually happens when user has closed all of application's windows and then
 | 
			
		||||
click on the application's dock icon.
 | 
			
		||||
 | 
			
		||||
## Event: browser-window-blur
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `window` BrowserWindow
 | 
			
		||||
 | 
			
		||||
Emitted when a [browserWindow](browser-window-ko.md) gets blurred.
 | 
			
		||||
 | 
			
		||||
## Event: browser-window-focus
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `window` BrowserWindow
 | 
			
		||||
 | 
			
		||||
Emitted when a [browserWindow](browser-window-ko.md) gets focused.
 | 
			
		||||
 | 
			
		||||
### Event: 'select-certificate'
 | 
			
		||||
 | 
			
		||||
Emitted when client certificate is requested.
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `webContents` [WebContents](browser-window-ko.md#class-webcontents)
 | 
			
		||||
* `url` String
 | 
			
		||||
* `certificateList` [Objects]
 | 
			
		||||
  * `data` PEM encoded data
 | 
			
		||||
  * `issuerName` Issuer's Common Name
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
app.on('select-certificate', function(event, host, url, list, callback) {
 | 
			
		||||
  event.preventDefault();
 | 
			
		||||
  callback(list[0]);
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
`url` corresponds to the navigation entry requesting the client certificate,
 | 
			
		||||
`callback` needs to be called with an entry filtered from the list.
 | 
			
		||||
`event.preventDefault()` prevents from using the first certificate from
 | 
			
		||||
the store.
 | 
			
		||||
 | 
			
		||||
### Event: 'gpu-process-crashed'
 | 
			
		||||
 | 
			
		||||
Emitted when the gpu process is crashed.
 | 
			
		||||
 | 
			
		||||
## app.quit()
 | 
			
		||||
 | 
			
		||||
Try to close all windows. The `before-quit` event will first be emitted. If all
 | 
			
		||||
windows are successfully closed, the `will-quit` event will be emitted and by
 | 
			
		||||
default the application would be terminated.
 | 
			
		||||
 | 
			
		||||
This method guarantees all `beforeunload` and `unload` handlers are correctly
 | 
			
		||||
executed. It is possible that a window cancels the quitting by returning
 | 
			
		||||
`false` in `beforeunload` handler.
 | 
			
		||||
 | 
			
		||||
## app.getPath(name)
 | 
			
		||||
 | 
			
		||||
* `name` String
 | 
			
		||||
 | 
			
		||||
Retrieves a path to a special directory or file associated with `name`. On
 | 
			
		||||
failure an `Error` would throw.
 | 
			
		||||
 | 
			
		||||
You can request following paths by the names:
 | 
			
		||||
 | 
			
		||||
* `home`: User's home directory
 | 
			
		||||
* `appData`: Per-user application data directory, by default it is pointed to:
 | 
			
		||||
  * `%APPDATA%` on Windows
 | 
			
		||||
  * `$XDG_CONFIG_HOME` or `~/.config` on Linux
 | 
			
		||||
  * `~/Library/Application Support` on OS X
 | 
			
		||||
* `userData`: The directory for storing your app's configuration files, by
 | 
			
		||||
  default it is the `appData` directory appended with your app's name
 | 
			
		||||
* `cache`: Per-user application cache directory, by default it is pointed to:
 | 
			
		||||
  * `%APPDATA%` on Window, which doesn't has a universal place for cache
 | 
			
		||||
  * `$XDG_CACHE_HOME` or `~/.cache` on Linux
 | 
			
		||||
  * `~/Library/Caches` on OS X
 | 
			
		||||
* `userCache`: The directory for placing your app's caches, by default it is the
 | 
			
		||||
 `cache` directory appended with your app's name
 | 
			
		||||
* `temp`: Temporary directory
 | 
			
		||||
* `userDesktop`: The current user's Desktop directory
 | 
			
		||||
* `exe`: The current executable file
 | 
			
		||||
* `module`: The `libchromiumcontent` library
 | 
			
		||||
 | 
			
		||||
## app.setPath(name, path)
 | 
			
		||||
 | 
			
		||||
* `name` String
 | 
			
		||||
* `path` String
 | 
			
		||||
 | 
			
		||||
Overrides the `path` to a special directory or file associated with `name`. if
 | 
			
		||||
the path specifies a directory that does not exist, the directory will be
 | 
			
		||||
created by this method. On failure an `Error` would throw.
 | 
			
		||||
 | 
			
		||||
You can only override paths of `name`s  defined in `app.getPath`.
 | 
			
		||||
 | 
			
		||||
By default web pages' cookies and caches will be stored under `userData`
 | 
			
		||||
directory, if you want to change this location, you have to override the
 | 
			
		||||
`userData` path before the `ready` event of `app` module gets emitted.
 | 
			
		||||
 | 
			
		||||
## app.getVersion()
 | 
			
		||||
 | 
			
		||||
Returns the version of loaded application, if no version is found in
 | 
			
		||||
application's `package.json`, the version of current bundle or executable would
 | 
			
		||||
be returned.
 | 
			
		||||
 | 
			
		||||
## app.getName()
 | 
			
		||||
 | 
			
		||||
Returns current application's name, the name in `package.json` would be
 | 
			
		||||
used.
 | 
			
		||||
 | 
			
		||||
Usually the `name` field of `package.json` is a short lowercased name, according
 | 
			
		||||
to the spec of npm modules. So usually you should also specify a `productName`
 | 
			
		||||
field, which is your application's full capitalized name, and it will be
 | 
			
		||||
preferred over `name` by Electron.
 | 
			
		||||
 | 
			
		||||
## app.resolveProxy(url, callback)
 | 
			
		||||
 | 
			
		||||
* `url` URL
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Resolves the proxy information for `url`, the `callback` would be called with
 | 
			
		||||
`callback(proxy)` when the request is done.
 | 
			
		||||
 | 
			
		||||
## app.addRecentDocument(path)
 | 
			
		||||
 | 
			
		||||
* `path` String
 | 
			
		||||
 | 
			
		||||
Adds `path` to recent documents list.
 | 
			
		||||
 | 
			
		||||
This list is managed by the system, on Windows you can visit the list from task
 | 
			
		||||
bar, and on Mac you can visit it from dock menu.
 | 
			
		||||
 | 
			
		||||
## app.clearRecentDocuments()
 | 
			
		||||
 | 
			
		||||
Clears the recent documents list.
 | 
			
		||||
 | 
			
		||||
## app.setUserTasks(tasks)
 | 
			
		||||
 | 
			
		||||
* `tasks` Array - Array of `Task` objects
 | 
			
		||||
 | 
			
		||||
Adds `tasks` to the [Tasks][tasks] category of JumpList on Windows.
 | 
			
		||||
 | 
			
		||||
The `tasks` is an array of `Task` objects in following format:
 | 
			
		||||
 | 
			
		||||
* `Task` Object
 | 
			
		||||
  * `program` String - Path of the program to execute, usually you should
 | 
			
		||||
    specify `process.execPath` which opens current program
 | 
			
		||||
  * `arguments` String - The arguments of command line when `program` is
 | 
			
		||||
    executed
 | 
			
		||||
  * `title` String - The string to be displayed in a JumpList
 | 
			
		||||
  * `description` String - Description of this task
 | 
			
		||||
  * `iconPath` String - The absolute path to an icon to be displayed in a
 | 
			
		||||
    JumpList, it can be arbitrary resource file that contains an icon, usually
 | 
			
		||||
    you can specify `process.execPath` to show the icon of the program
 | 
			
		||||
  * `iconIndex` Integer - The icon index in the icon file. If an icon file
 | 
			
		||||
    consists of two or more icons, set this value to identify the icon. If an
 | 
			
		||||
    icon file consists of one icon, this value is 0
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Windows.
 | 
			
		||||
 | 
			
		||||
## app.commandLine.appendSwitch(switch, [value])
 | 
			
		||||
 | 
			
		||||
Append a switch [with optional value] to Chromium's command line.
 | 
			
		||||
 | 
			
		||||
**Note:** This will not affect `process.argv`, and is mainly used by developers
 | 
			
		||||
to control some low-level Chromium behaviors.
 | 
			
		||||
 | 
			
		||||
## app.commandLine.appendArgument(value)
 | 
			
		||||
 | 
			
		||||
Append an argument to Chromium's command line. The argument will quoted properly.
 | 
			
		||||
 | 
			
		||||
**Note:** This will not affect `process.argv`.
 | 
			
		||||
 | 
			
		||||
## app.dock.bounce([type])
 | 
			
		||||
 | 
			
		||||
* `type` String - Can be `critical` or `informational`, the default is
 | 
			
		||||
 `informational`
 | 
			
		||||
 | 
			
		||||
When `critical` is passed, the dock icon will bounce until either the
 | 
			
		||||
application becomes active or the request is canceled.
 | 
			
		||||
 | 
			
		||||
When `informational` is passed, the dock icon will bounce for one second. The
 | 
			
		||||
request, though, remains active until either the application becomes active or
 | 
			
		||||
the request is canceled.
 | 
			
		||||
 | 
			
		||||
An ID representing the request would be returned.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.cancelBounce(id)
 | 
			
		||||
 | 
			
		||||
* `id` Integer
 | 
			
		||||
 | 
			
		||||
Cancel the bounce of `id`.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.setBadge(text)
 | 
			
		||||
 | 
			
		||||
* `text` String
 | 
			
		||||
 | 
			
		||||
Sets the string to be displayed in the dock’s badging area.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.getBadge()
 | 
			
		||||
 | 
			
		||||
Returns the badge string of the dock.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.hide()
 | 
			
		||||
 | 
			
		||||
Hides the dock icon.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.show()
 | 
			
		||||
 | 
			
		||||
Shows the dock icon.
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
## app.dock.setMenu(menu)
 | 
			
		||||
 | 
			
		||||
* `menu` Menu
 | 
			
		||||
 | 
			
		||||
Sets the application [dock menu][dock-menu].
 | 
			
		||||
 | 
			
		||||
**Note:** This API is only available on Mac.
 | 
			
		||||
 | 
			
		||||
[dock-menu]:https://developer.apple.com/library/mac/documentation/Carbon/Conceptual/customizing_docktile/concepts/dockconcepts.html#//apple_ref/doc/uid/TP30000986-CH2-TPXREF103
 | 
			
		||||
[tasks]:http://msdn.microsoft.com/en-us/library/windows/desktop/dd378460(v=vs.85).aspx#tasks
 | 
			
		||||
| 
						 | 
				
			
			@ -1,56 +1,41 @@
 | 
			
		|||
# auto-updater
 | 
			
		||||
 | 
			
		||||
**This module has only been implemented for OS X.**
 | 
			
		||||
**이 모듈은 현재 OS X에서만 사용할 수 있습니다.**
 | 
			
		||||
 | 
			
		||||
Check out [atom/grunt-electron-installer](https://github.com/atom/grunt-electron-installer)
 | 
			
		||||
for building a Windows installer for your app.
 | 
			
		||||
Windows 어플리케이션 인스톨러를 생성하려면 [atom/grunt-electron-installer](https://github.com/atom/grunt-electron-installer)를 참고하세요.
 | 
			
		||||
 | 
			
		||||
The `auto-updater` module is a simple wrap around the
 | 
			
		||||
[Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac) framework.
 | 
			
		||||
`auto-updater` 모듈은 [Squirrel.Mac](https://github.com/Squirrel/Squirrel.Mac) 프레임워크의 간단한 Wrapper입니다.
 | 
			
		||||
 | 
			
		||||
Squirrel.Mac requires that your `.app` folder is signed using the
 | 
			
		||||
Squirrel.Mac은 업데이트 설치를 위해 `.app` 폴더에
 | 
			
		||||
[codesign](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/codesign.1.html)
 | 
			
		||||
utility for updates to be installed.
 | 
			
		||||
툴을 사용한 서명을 요구합니다.
 | 
			
		||||
 | 
			
		||||
## Squirrel
 | 
			
		||||
 | 
			
		||||
Squirrel is an OS X framework focused on making application updates **as safe
 | 
			
		||||
and transparent as updates to a website**.
 | 
			
		||||
Squirrel은 어플리케이션이 **안전하고 투명한 업데이트**를 제공할 수 있도록 하는데 초점이 맞춰진 OS X 프레임워크입니다.
 | 
			
		||||
 | 
			
		||||
Instead of publishing a feed of versions from which your app must select,
 | 
			
		||||
Squirrel updates to the version your server tells it to. This allows you to
 | 
			
		||||
intelligently update your clients based on the request you give to Squirrel.
 | 
			
		||||
Squirrel은 사용자에게 어플리케이션의 업데이트를 알릴 필요 없이 서버가 지시하는 버전을 받아온 후 자동으로 업데이트합니다.
 | 
			
		||||
이 기능을 사용하면 Squirrel을 통해 클라이언트의 어플리케이션을 지능적으로 업데이트 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
Your request can include authentication details, custom headers or a request
 | 
			
		||||
body so that your server has the context it needs in order to supply the most
 | 
			
		||||
suitable update.
 | 
			
		||||
요청시 커스텀 헤더 또는 요청 본문에 인증 정보를 포함시킬 수도 있습니다.
 | 
			
		||||
서버에선 이러한 요청을 분류 처리하여 적당한 업데이트를 제공할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
The update JSON Squirrel requests should be dynamically generated based on
 | 
			
		||||
criteria in the request, and whether an update is required. Squirrel relies
 | 
			
		||||
on server side support for determining whether an update is required, see
 | 
			
		||||
[Server Support](#server-support).
 | 
			
		||||
Squirrel JSON 업데이트 요청시 처리는 반드시 어떤 업데이트가 필요한지 요청의 기준에 맞춰 동적으로 생성되어야 합니다.
 | 
			
		||||
Squirrel은 사용해야 하는 업데이트 선택하는 과정을 서버에 의존합니다. [서버 지원](#server-support)을 참고하세요.
 | 
			
		||||
 | 
			
		||||
Squirrel's installer is also designed to be fault tolerant, and ensure that any
 | 
			
		||||
updates installed are valid.
 | 
			
		||||
Squirrel의 인스톨러는 오류에 관대하게 설계되었습니다. 그리고 업데이트가 유효한지 확인합니다.
 | 
			
		||||
 | 
			
		||||
## Update Requests
 | 
			
		||||
## 업데이트 요청
 | 
			
		||||
 | 
			
		||||
Squirrel is indifferent to the request the client application provides for
 | 
			
		||||
update checking. `Accept: application/json` is added to the request headers
 | 
			
		||||
because Squirrel is responsible for parsing the response.
 | 
			
		||||
Squirrel은 업데이트 확인을 위해 클라이언트 어플리케이션의 요청은 무시합니다.
 | 
			
		||||
Squirrel은 응답을 분석해야 할 책임이 있기 때문에 `Accept: application/json`이 요청 헤더에 추가됩니다.
 | 
			
		||||
 | 
			
		||||
For the requirements imposed on the responses and the body format of an update
 | 
			
		||||
response see [Server Support](#server-support).
 | 
			
		||||
업데이트 응답과 본문 포맷에 대한 요구 사항은 [Server Support](#server-support)를 참고하세요.
 | 
			
		||||
 | 
			
		||||
Your update request must *at least* include a version identifier so that the
 | 
			
		||||
server can determine whether an update for this specific version is required. It
 | 
			
		||||
may also include other identifying criteria such as operating system version or
 | 
			
		||||
username, to allow the server to deliver as fine grained an update as you
 | 
			
		||||
would like.
 | 
			
		||||
업데이트 요청에는 서버가 해당 어플리케이션이 어떤 버전을 사용해야 하는지 판단하기 위해 *반드시* 버전 식별자를 포함시켜야 합니다.
 | 
			
		||||
추가로 OS 버전, 사용자 이름 같은 다른 식별 기준을 포함하여 서버에서 적합한 어플리케이션을 제공할 수 있도록 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
How you include the version identifier or other criteria is specific to the
 | 
			
		||||
server that you are requesting updates from. A common approach is to use query
 | 
			
		||||
parameters, like this:
 | 
			
		||||
버전 식별자와 다른 기준을 특정하는 업데이트 요청 폼을 서버로 전달하기 위한 공통적인 방법으로 쿼리 인자를 사용하는 방법이 있습니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
// On the main process
 | 
			
		||||
| 
						 | 
				
			
			@ -59,64 +44,56 @@ var autoUpdater = require('auto-updater');
 | 
			
		|||
autoUpdater.setFeedUrl('http://mycompany.com/myapp/latest?version=' + app.getVersion());
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Server Support
 | 
			
		||||
## 서버 지원
 | 
			
		||||
 | 
			
		||||
Your server should determine whether an update is required based on the
 | 
			
		||||
[Update Request](#update-requests) your client issues.
 | 
			
		||||
업데이트를 제공하는 서버는 반드시 클라이언트로부터 받은 [Update Request](#update-requests)를 기반으로 업데이트를 처리할 수 있어야 합니다.
 | 
			
		||||
 | 
			
		||||
If an update is required your server should respond with a status code of
 | 
			
		||||
[200 OK](http://tools.ietf.org/html/rfc2616#section-10.2.1) and include the
 | 
			
		||||
[update JSON](#update-json-format) in the body. Squirrel **will** download and
 | 
			
		||||
install this update, even if the version of the update is the same as the
 | 
			
		||||
currently running version. To save redundantly downloading the same version
 | 
			
		||||
multiple times your server must not inform the client to update.
 | 
			
		||||
만약 업데이트 요청이 들어오면 서버는 반드시 [200 OK](http://tools.ietf.org/html/rfc2616#section-10.2.1) 상태 코드를 포함한
 | 
			
		||||
[업데이트 JSON](#update-json-format)을 본문으로 보내야 합니다.
 | 
			
		||||
이 응답을 받으면 Squirrel은 이 업데이트를 다운로드할 것입니다. 참고로 현재 설치된 버전과 서버에서 받아온 새로운 버전이 같아도 상관하지 않고 무조건 받습니다.
 | 
			
		||||
업데이트시 버전 중복을 피하려면 서버에서 클라이언트 업데이트 요청에 대해 통보하지 않으면 됩니다.
 | 
			
		||||
 | 
			
		||||
If no update is required your server must respond with a status code of
 | 
			
		||||
[204 No Content](http://tools.ietf.org/html/rfc2616#section-10.2.5). Squirrel
 | 
			
		||||
will check for an update again at the interval you specify.
 | 
			
		||||
만약 따로 업데이트가 없다면 [204 No Content](http://tools.ietf.org/html/rfc2616#section-10.2.5) 상태 코드를 반환해야 합니다.
 | 
			
		||||
Squirrel은 지정한 시간이 지난 후 다시 업데이트를 확인합니다.
 | 
			
		||||
 | 
			
		||||
## Update JSON Format
 | 
			
		||||
## JSON 포맷 업데이트
 | 
			
		||||
 | 
			
		||||
When an update is available, Squirrel expects the following schema in response
 | 
			
		||||
to the update request provided:
 | 
			
		||||
업데이트가 사용 가능한 경우 Squirrel은 다음과 같은 구조의 json 데이터를 응답으로 받습니다:
 | 
			
		||||
 | 
			
		||||
```json
 | 
			
		||||
{
 | 
			
		||||
  "url": "http://mycompany.com/myapp/releases/myrelease",
 | 
			
		||||
  "name": "My Release Name",
 | 
			
		||||
  "notes": "Theses are some release notes innit",
 | 
			
		||||
  "pub_date": "2013-09-18T12:29:53+01:00",
 | 
			
		||||
  "pub_date": "2013-09-18T12:29:53+01:00"
 | 
			
		||||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The only required key is "url", the others are optional.
 | 
			
		||||
응답 json 데이터에서 "url" 키는 필수적으로 포함해야 하고 다른 키들은 옵션입니다.
 | 
			
		||||
 | 
			
		||||
Squirrel will request "url" with `Accept: application/zip` and only supports
 | 
			
		||||
installing ZIP updates. If future update formats are supported their MIME type
 | 
			
		||||
will be added to the `Accept` header so that your server can return the
 | 
			
		||||
appropriate format.
 | 
			
		||||
Squirrel은 "url"로 `Accept: application/zip` 헤더와 함께 업데이트 zip 파일을 요청합니다.
 | 
			
		||||
향후 업데이트 포맷에 대해 서버에서 적절한 포맷을 반환할 수 있도록 MIME 타입을 `Accept` 헤더에 담아 요청합니다.
 | 
			
		||||
 | 
			
		||||
`pub_date` if present must be formatted according to ISO 8601.
 | 
			
		||||
`pub_date`은 ISO 8601 표준에 따라 포맷된 날짜입니다.
 | 
			
		||||
 | 
			
		||||
## Event: error
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `message` String
 | 
			
		||||
 | 
			
		||||
Emitted when there is an error updating.
 | 
			
		||||
업데이트시 에러가 나면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: checking-for-update
 | 
			
		||||
 | 
			
		||||
Emitted when checking for update has started.
 | 
			
		||||
업데이트를 확인하기 시작할 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: update-available
 | 
			
		||||
 | 
			
		||||
Emitted when there is an available update, the update would be downloaded
 | 
			
		||||
automatically.
 | 
			
		||||
사용 가능한 업데이트가 있을 때 발생하는 이벤트입니다. 이벤트는 자동으로 다운로드 됩니다.
 | 
			
		||||
 | 
			
		||||
## Event: update-not-available
 | 
			
		||||
 | 
			
		||||
Emitted when there is no available update.
 | 
			
		||||
사용 가능한 업데이트가 없을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: update-downloaded
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -127,17 +104,14 @@ Emitted when there is no available update.
 | 
			
		|||
* `updateUrl` String
 | 
			
		||||
* `quitAndUpdate` Function
 | 
			
		||||
 | 
			
		||||
Emitted when update has been downloaded, calling `quitAndUpdate()` would restart
 | 
			
		||||
the application and install the update.
 | 
			
		||||
업데이트의 다운로드가 완료되었을 때 발생하는 이벤트입니다. `quitAndUpdate()`를 호출하면 어플리케이션을 종료하고 업데이트를 설치합니다.
 | 
			
		||||
 | 
			
		||||
## autoUpdater.setFeedUrl(url)
 | 
			
		||||
 | 
			
		||||
* `url` String
 | 
			
		||||
 | 
			
		||||
Set the `url` and initialize the auto updater. The `url` could not be changed
 | 
			
		||||
once it is set.
 | 
			
		||||
`url`을 설정하고 자동 업데이터를 초기화합니다. `url`은 한번 설정되면 변경할 수 없습니다.
 | 
			
		||||
 | 
			
		||||
## autoUpdater.checkForUpdates()
 | 
			
		||||
 | 
			
		||||
Ask the server whether there is an update, you have to call `setFeedUrl` before
 | 
			
		||||
using this API.
 | 
			
		||||
서버에 새로운 업데이트가 있는지 요청을 보내 확인합니다. API를 사용하기 전에 `setFeedUrl`를 호출해야 합니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -1,9 +1,8 @@
 | 
			
		|||
# 크롬 Command-Line 스위치 지원
 | 
			
		||||
 | 
			
		||||
The following command lines switches in Chrome browser are also supported in
 | 
			
		||||
Electron, you can use [app.commandLine.appendSwitch][append-switch] to append
 | 
			
		||||
them in your app's main script before the [ready][ready] event of [app][app]
 | 
			
		||||
module is emitted:
 | 
			
		||||
다음 Command-Line 스위치들은 크롬 브라우저에서 제공되는 추가 옵션이며 Electron에서도 지원합니다.
 | 
			
		||||
[app][app]의 [ready][ready]이벤트가 작동하기 전에 [app.commandLine.appendSwitch][append-switch] API를 사용하면
 | 
			
		||||
어플리케이션 내부에서 스위치들을 추가할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var app = require('app');
 | 
			
		||||
| 
						 | 
				
			
			@ -17,35 +16,37 @@ app.on('ready', function() {
 | 
			
		|||
 | 
			
		||||
## --client-certificate=`path`
 | 
			
		||||
 | 
			
		||||
Sets `path` of client certificate file.
 | 
			
		||||
`path`를 클라이언트 인증서로 설정합니다.
 | 
			
		||||
 | 
			
		||||
## --ignore-connections-limit=`domains`
 | 
			
		||||
 | 
			
		||||
Ignore the connections limit for `domains` list seperated by `,`.
 | 
			
		||||
`domains` 리스트(`,`로 구분)의 연결 제한을 무시합니다.
 | 
			
		||||
 | 
			
		||||
## --disable-http-cache
 | 
			
		||||
 | 
			
		||||
Disables the disk cache for HTTP requests.
 | 
			
		||||
HTTP 요청 캐시를 비활성화 합니다.
 | 
			
		||||
 | 
			
		||||
## --remote-debugging-port=`port`
 | 
			
		||||
 | 
			
		||||
Enables remote debug over HTTP on the specified `port`.
 | 
			
		||||
지정한 `port`에 HTTP기반의 리모트 디버거를 활성화 시킵니다. (개발자 콘솔)
 | 
			
		||||
 | 
			
		||||
## --proxy-server=`address:port`
 | 
			
		||||
 | 
			
		||||
Uses a specified proxy server, overrides system settings. This switch only
 | 
			
		||||
affects HTTP and HTTPS requests.
 | 
			
		||||
시스템 설정의 프록시 서버를 무시하고 지정한 서버로 연결합니다. HTTP와 HTTPS 요청에만 적용됩니다.
 | 
			
		||||
 | 
			
		||||
## --proxy-pac-url=`url`
 | 
			
		||||
 | 
			
		||||
지정한 `url`의 PAC 스크립트를 사용합니다.
 | 
			
		||||
 | 
			
		||||
## --no-proxy-server
 | 
			
		||||
 | 
			
		||||
Don't use a proxy server, always make direct connections. Overrides any other
 | 
			
		||||
proxy server flags that are passed.
 | 
			
		||||
프록시 서버를 사용하지 않습니다. 다른 프록시 서버 플래그 및 설정을 무시하고 언제나 직접 연결을 사용합니다.
 | 
			
		||||
 | 
			
		||||
## --host-rules=`rules`
 | 
			
		||||
 | 
			
		||||
Comma-separated list of `rules` that control how hostnames are mapped.
 | 
			
		||||
Hostname 맵핑 규칙을 설정합니다. (`,`로 분리)
 | 
			
		||||
 | 
			
		||||
For example:
 | 
			
		||||
예시:
 | 
			
		||||
 | 
			
		||||
* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1
 | 
			
		||||
* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to
 | 
			
		||||
| 
						 | 
				
			
			@ -55,13 +56,11 @@ For example:
 | 
			
		|||
* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for
 | 
			
		||||
  "www.google.com".
 | 
			
		||||
  
 | 
			
		||||
These mappings apply to the endpoint host in a net request (the TCP connect
 | 
			
		||||
and host resolver in a direct connection, and the `CONNECT` in an http proxy
 | 
			
		||||
connection, and the endpoint host in a `SOCKS` proxy connection).
 | 
			
		||||
이 맵핑은 네트워크 요청시의 endpoint를 지정합니다. (TCP 연결과 직접 연결의 호스트 resolver, http 프록시 연결의 `CONNECT`, `SOCKS` 프록시 연결의 endpoint 호스트)
 | 
			
		||||
 | 
			
		||||
## --host-resolver-rules=`rules`
 | 
			
		||||
 | 
			
		||||
Like `--host-rules` but these `rules` only apply to the host resolver.
 | 
			
		||||
`--host-rules` 플래그와 비슷하지만 이 플래그는 host resolver에만 적용됩니다.
 | 
			
		||||
 | 
			
		||||
[app]: app-ko.md
 | 
			
		||||
[append-switch]: app-ko.md#appcommandlineappendswitchswitch-value
 | 
			
		||||
| 
						 | 
				
			
			@ -69,39 +68,36 @@ Like `--host-rules` but these `rules` only apply to the host resolver.
 | 
			
		|||
 | 
			
		||||
## --ignore-certificate-errors
 | 
			
		||||
 | 
			
		||||
Ignores certificate related errors.
 | 
			
		||||
인증서 에러를 무시합니다.
 | 
			
		||||
 | 
			
		||||
## --ppapi-flash-path=`path`
 | 
			
		||||
 | 
			
		||||
Sets `path` of pepper flash plugin.
 | 
			
		||||
Pepper 플래시 플러그인의 위치를 설정합니다.
 | 
			
		||||
 | 
			
		||||
## --ppapi-flash-version=`version`
 | 
			
		||||
 | 
			
		||||
Sets `version` of pepper flash plugin.
 | 
			
		||||
Pepper 플래시 플러그인의 버전을 설정합니다.
 | 
			
		||||
 | 
			
		||||
## --log-net-log=`path`
 | 
			
		||||
 | 
			
		||||
Enables saving net log events and writes them to `path`.
 | 
			
		||||
Net log 이벤트를 지정한 `path`에 로그로 기록합니다.
 | 
			
		||||
 | 
			
		||||
## --v=`log_level`
 | 
			
		||||
 | 
			
		||||
Gives the default maximal active V-logging level; 0 is the default. Normally
 | 
			
		||||
positive values are used for V-logging levels.
 | 
			
		||||
기본 V-logging 최대 활성화 레벨을 지정합니다. 기본값은 0입니다. 기본적으로 양수를 레벨로 사용합니다.
 | 
			
		||||
 | 
			
		||||
Passing `--v=-1` will disable logging.
 | 
			
		||||
`--v=-1`를 사용하면 로깅이 비활성화 됩니다.
 | 
			
		||||
 | 
			
		||||
## --vmodule=`pattern`
 | 
			
		||||
 | 
			
		||||
Gives the per-module maximal V-logging levels to override the value given by
 | 
			
		||||
`--v`. E.g. `my_module=2,foo*=3` would change the logging level for all code in
 | 
			
		||||
source files `my_module.*` and `foo*.*`.
 | 
			
		||||
`--v` 옵션에 전달된 값을 덮어쓰고 모듈당 최대 V-logging 레벨을 지정합니다.
 | 
			
		||||
예를 들어 `my_module=2,foo*=3`는 `my_module.*`, `foo*.*`와 같은 파일 이름 패턴을 가진 모든 소스 코드들의 로깅 레벨을 각각 2와 3으로 설정합니다.
 | 
			
		||||
 | 
			
		||||
Any pattern containing a forward or backward slash will be tested against the
 | 
			
		||||
whole pathname and not just the module. E.g. `*/foo/bar/*=2` would change the
 | 
			
		||||
logging level for all code in source files under a `foo/bar` directory.
 | 
			
		||||
슬래시(`/`), 백슬래시(`\`)를 포함하는 모든 패턴은 모듈뿐만 아니라 모든 경로명에 대해서도 테스트 됩니다.
 | 
			
		||||
예를 들어 `*/foo/bar/*=2` 표현식은 `foo/bar` 디렉터리 안의 모든 소스 코드의 로깅 레벨을 2로 지정합니다.
 | 
			
		||||
 | 
			
		||||
모든 크로미움과 관련된 로그를 비활성화하고 어플리케이션의 로그만 활성화 하려면 다음과 같이 코드를 작성하면 됩니다:
 | 
			
		||||
 | 
			
		||||
To disable all chromium related logs and only enable your application logs you
 | 
			
		||||
can do:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
app.commandLine.appendSwitch('v', -1);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -86,3 +86,18 @@ console.log(clipboard.has('<p>selection</p>'));
 | 
			
		|||
클립보드로부터 `data`를 읽어들입니다.
 | 
			
		||||
 | 
			
		||||
**알림:** 이 API는 실험적인 기능이며 차후 최신버전에서 제외될 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## clipboard.write(data[, type])
 | 
			
		||||
 | 
			
		||||
* `data` Object
 | 
			
		||||
  * `text` String
 | 
			
		||||
  * `html` String
 | 
			
		||||
  * `image` [NativeImage](native-image.md)
 | 
			
		||||
* `type` String
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var clipboard = require('clipboard');
 | 
			
		||||
clipboard.write({text: 'test', html: "<b>test</b>"});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
`data`를 클립보드에 씁니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,9 +1,7 @@
 | 
			
		|||
# content-tracing
 | 
			
		||||
 | 
			
		||||
The `content-trace` module is used to collect tracing data generated by the
 | 
			
		||||
underlying Chromium content module. This module does not include a web interface
 | 
			
		||||
so you need to open `chrome://tracing/` in a Chrome browser and load the generated
 | 
			
		||||
file to view the result.
 | 
			
		||||
`content-trace` 모듈은 Chromium 컨텐츠 모듈단에서 생성된 데이터를 수집하고 추적하는데 사용됩니다.
 | 
			
		||||
이 모듈은 웹 인터페이스를 포함하고 있지 않으며 크롬 브라우저에서 `chrome://tracing/` 페이지를 열어 생성된 파일을 로드하면 결과를 볼 수 있습니다.
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var tracing = require('content-tracing');
 | 
			
		||||
| 
						 | 
				
			
			@ -22,88 +20,92 @@ tracing.startRecording('*', tracing.DEFAULT_OPTIONS, function() {
 | 
			
		|||
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Get a set of category groups. The category groups can change as new code paths
 | 
			
		||||
are reached.
 | 
			
		||||
카테고리 그룹 세트를 가져옵니다. 카테고리 그룹은 도달된 코드 경로를 변경할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
Once all child processes have acked to the `getCategories` request, `callback`
 | 
			
		||||
is invoked with an array of category groups.
 | 
			
		||||
모든 child 프로세스가 `getCategories` 요청을 받으면 `callback`이 호출되며 인자에 카테고리 그룹의 배열이 전달됩니다.
 | 
			
		||||
 | 
			
		||||
## tracing.startRecording(categoryFilter, options, callback)
 | 
			
		||||
## tracing.startRecording(categoryFilter, traceOptions, callback)
 | 
			
		||||
 | 
			
		||||
* `categoryFilter` String
 | 
			
		||||
* `options` Integer
 | 
			
		||||
* `traceOptions` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Start recording on all processes.
 | 
			
		||||
모든 프로세스에서 레코딩을 시작합니다.
 | 
			
		||||
 | 
			
		||||
Recording begins immediately locally, and asynchronously on child processes
 | 
			
		||||
as soon as they receive the EnableRecording request. Once all child processes
 | 
			
		||||
have acked to the `startRecording` request, `callback` will be called back.
 | 
			
		||||
레코딩은 지역적으로 즉시 실행됩니다. 그리고 비동기로 child 프로세스는 곧 EnableRecording 요청을 받게 됩니다.
 | 
			
		||||
모든 child 프로세스가 `startRecording` 요청을 받으면 `callback`이 호출됩니다.
 | 
			
		||||
 | 
			
		||||
`categoryFilter` is a filter to control what category groups should be
 | 
			
		||||
traced. A filter can have an optional `-` prefix to exclude category groups
 | 
			
		||||
that contain a matching category. Having both included and excluded
 | 
			
		||||
category patterns in the same list is not supported.
 | 
			
		||||
`categoryFilter`는 어떤 카테고리 그룹이 트레이싱 되어야 하는지 필터링할 수 있습니다.
 | 
			
		||||
필터는 `-` 접두사를 통해 특정 카테고리 그룹을 제외할 수 있습니다.
 | 
			
		||||
카테고리 패턴은 같은 리스트 내에서 포함과 제외를 함께 사용할 수 없습니다.
 | 
			
		||||
 | 
			
		||||
Examples:
 | 
			
		||||
예제:
 | 
			
		||||
 | 
			
		||||
* `test_MyTest*`,
 | 
			
		||||
* `test_MyTest*,test_OtherStuff`,
 | 
			
		||||
* `"-excluded_category1,-excluded_category2`
 | 
			
		||||
 | 
			
		||||
`options` controls what kind of tracing is enabled, it could be a OR-ed
 | 
			
		||||
combination of `tracing.DEFAULT_OPTIONS`, `tracing.ENABLE_SYSTRACE`,
 | 
			
		||||
`tracing.ENABLE_SAMPLING` and `tracing.RECORD_CONTINUOUSLY`.
 | 
			
		||||
`traceOptions`은 어떤 종류의 트레이싱을 사용할 수 있는지 지정하고 콤마로 리스트를 구분합니다.
 | 
			
		||||
 | 
			
		||||
사용할 수 있는 옵션은 다음과 같습니다:
 | 
			
		||||
 | 
			
		||||
* `record-until-full`
 | 
			
		||||
* `record-continuously`
 | 
			
		||||
* `trace-to-console`
 | 
			
		||||
* `enable-sampling`
 | 
			
		||||
* `enable-systrace`
 | 
			
		||||
 | 
			
		||||
첫번째부터 3번째까지의 옵션은 추적 레코딩 모드입니다. 이에 따라 상호 배타적입니다.
 | 
			
		||||
만약 레코딩 모드가 한 개 이상 지정되면 마지막 지정한 모드만 사용됩니다.
 | 
			
		||||
어떤 모드도 설정되지 않았다면 `record-until-full` 모드가 기본으로 사용됩니다.
 | 
			
		||||
 | 
			
		||||
추적 옵션은 `traceOptions`이 파싱되어 적용되기 전까지 다음과 같은 기본값이 사용됩니다.
 | 
			
		||||
 | 
			
		||||
`record-until-full`이 기본 모드, `enable-sampling`과 `enable-systrace`옵션은 포함되지 않음
 | 
			
		||||
 | 
			
		||||
## tracing.stopRecording(resultFilePath, callback)
 | 
			
		||||
 | 
			
		||||
* `resultFilePath` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Stop recording on all processes.
 | 
			
		||||
모든 프로세스에서 레코딩을 중지합니다.
 | 
			
		||||
 | 
			
		||||
Child processes typically are caching trace data and only rarely flush and send
 | 
			
		||||
trace data back to the main process. That is because it may be an expensive
 | 
			
		||||
operation to send the trace data over IPC, and we would like to avoid much
 | 
			
		||||
runtime overhead of tracing. So, to end tracing, we must asynchronously ask all
 | 
			
		||||
child processes to flush any pending trace data.
 | 
			
		||||
Child 프로세스는 일반적으로 추적 데이터와 희귀한 플러시 그리고 추적 데이터를 메인 프로세스로 보내는 작업에 대해 캐싱 합니다.
 | 
			
		||||
이러한 일을 하는 이유는 IPC를 통해 추적 데이터를 보내는 작업은 매우 비싼 연산을 동반하기 때문입니다.
 | 
			
		||||
우리는 추적에 의한 런타임 오버헤드를 피하는 것을 지향합니다.
 | 
			
		||||
그래서 트레이싱이 끝나면 모든 child 프로세스에 보류된 추적 데이터를 플러시 할 것인지 물어봅니다.
 | 
			
		||||
 | 
			
		||||
Once all child processes have acked to the `stopRecording` request, `callback`
 | 
			
		||||
will be called back with a file that contains the traced data.
 | 
			
		||||
모든 child 프로세스가 `stopRecording` 요청을 받으면 `callback`에 추적 데이터를 포함한 파일을 전달됩니다.
 | 
			
		||||
 | 
			
		||||
Trace data will be written into `resultFilePath` if it is not empty, or into a
 | 
			
		||||
temporary file. The actual file path will be passed to `callback` if it's not
 | 
			
		||||
null.
 | 
			
		||||
추적 데이터는 `resultFilePath` 해당 경로가 비어있는 경우에 한 해 해당 경로에 작성되거나 임시 파일에 작성됩니다.
 | 
			
		||||
실제 파일 경로는 null이 아닌 이상 `callback`을 통해 전달됩니다.
 | 
			
		||||
 | 
			
		||||
## tracing.startMonitoring(categoryFilter, options, callback)
 | 
			
		||||
## tracing.startMonitoring(categoryFilter, traceOptions, callback)
 | 
			
		||||
 | 
			
		||||
* `categoryFilter` String
 | 
			
		||||
* `options` Integer
 | 
			
		||||
* `traceOptions` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Start monitoring on all processes.
 | 
			
		||||
모든 프로세스에서 모니터링을 시작합니다.
 | 
			
		||||
 | 
			
		||||
Monitoring begins immediately locally, and asynchronously on child processes as
 | 
			
		||||
soon as they receive the `startMonitoring` request.
 | 
			
		||||
모니터링은 지역적으로 즉시 시작됩니다. 그리고 이내 자식 프로세스들이 `startMonitoring` 비동기 요청을 받습니다.
 | 
			
		||||
 | 
			
		||||
Once all child processes have acked to the `startMonitoring` request,
 | 
			
		||||
`callback` will be called back.
 | 
			
		||||
모든 자식 프로세스가 `startMonitoring` 요청을 받으면 `callback`이 호출됩니다.
 | 
			
		||||
 | 
			
		||||
## tracing.stopMonitoring(callback);
 | 
			
		||||
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Stop monitoring on all processes.
 | 
			
		||||
모든 프로세스에서 모니터링을 중단합니다.
 | 
			
		||||
 | 
			
		||||
Once all child processes have acked to the `stopMonitoring` request, `callback`
 | 
			
		||||
is called back.
 | 
			
		||||
모든 자식 프로세스가 `stopMonitoring` 요청을 받으면 `callback`이 호출됩니다.
 | 
			
		||||
 | 
			
		||||
## tracing.captureMonitoringSnapshot(resultFilePath, callback)
 | 
			
		||||
 | 
			
		||||
* `resultFilePath` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Get the current monitoring traced data.
 | 
			
		||||
현재 모니터링 추적 데이터를 가져옵니다.
 | 
			
		||||
 | 
			
		||||
Child processes typically are caching trace data and only rarely flush and send
 | 
			
		||||
trace data back to the main process. That is because it may be an expensive
 | 
			
		||||
| 
						 | 
				
			
			@ -114,7 +116,6 @@ child processes to flush any pending trace data.
 | 
			
		|||
Once all child processes have acked to the `captureMonitoringSnapshot` request,
 | 
			
		||||
the `callback` will be invoked with a file that contains the traced data.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## tracing.getTraceBufferUsage(callback)
 | 
			
		||||
 | 
			
		||||
* `callback` Function
 | 
			
		||||
| 
						 | 
				
			
			@ -133,5 +134,6 @@ process.
 | 
			
		|||
 | 
			
		||||
## tracing.cancelWatchEvent()
 | 
			
		||||
 | 
			
		||||
Cancel the watch event. If tracing is enabled, this may race with the watch
 | 
			
		||||
event callback.
 | 
			
		||||
Watch 이벤트를 중단합니다. 만약 추적이 활성화되어 있다면 이 함수는 watch 이벤트 콜백과 race가 일어날 것입니다.
 | 
			
		||||
 | 
			
		||||
Cancel the watch event. If tracing is enabled, this may race with the watch event callback.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
# crash-reporter
 | 
			
		||||
 | 
			
		||||
An example of automatically submitting crash reporters to remote server:
 | 
			
		||||
다음 예제는 윈격 서버에 어플리케이션 오류 정보를 자동으로 보고하는 예제입니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
crashReporter = require('crash-reporter');
 | 
			
		||||
| 
						 | 
				
			
			@ -15,47 +15,46 @@ crashReporter.start({
 | 
			
		|||
## crashReporter.start(options)
 | 
			
		||||
 | 
			
		||||
* `options` Object
 | 
			
		||||
  * `productName` String, default: Electron
 | 
			
		||||
  * `companyName` String, default: GitHub, Inc
 | 
			
		||||
  * `submitUrl` String, default: http://54.249.141.255:1127/post
 | 
			
		||||
    * URL that crash reports would be sent to as POST
 | 
			
		||||
  * `autoSubmit` Boolean, default: true
 | 
			
		||||
    * Send the crash report without user interaction
 | 
			
		||||
  * `ignoreSystemCrashHandler` Boolean, default: false
 | 
			
		||||
  * `productName` String, 기본값: Electron
 | 
			
		||||
  * `companyName` String, 기본값: GitHub, Inc
 | 
			
		||||
  * `submitUrl` String, 기본값: http://54.249.141.255:1127/post
 | 
			
		||||
    * Crash Reporter는 POST 방식으로 해당 URL에 전송됩니다.
 | 
			
		||||
  * `autoSubmit` Boolean, 기본값: true
 | 
			
		||||
    * true로 지정할 경우 유저의 승인 없이 자동으로 오류를 보고합니다.
 | 
			
		||||
  * `ignoreSystemCrashHandler` Boolean, 기본값: false
 | 
			
		||||
  * `extra` Object
 | 
			
		||||
    * An object you can define which content will be send along with the report.
 | 
			
		||||
    * Only string properties are send correctly.
 | 
			
		||||
    * Nested objects are not supported.
 | 
			
		||||
    * 오류보고 시 같이 보낼 추가 정보를 지정하는 객체입니다.
 | 
			
		||||
    * 문자열로 된 속성만 정상적으로 보내집니다.
 | 
			
		||||
    * 중첩 객체는 지원되지 않습니다. (Nested objects are not supported)
 | 
			
		||||
    
 | 
			
		||||
Developers are required to call the API before using other crashReporter APIs.
 | 
			
		||||
다른 crashReporter API들을 사용하기 전에 이 함수를 먼저 호출해야 합니다.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
**Note:** On OS X, electron uses a new `crashpad` client, which is different
 | 
			
		||||
with the `breakpad` on Windows and Linux. To enable crash collection feature,
 | 
			
		||||
you are required to call `crashReporter.start` API to initiliaze `crashpad` in
 | 
			
		||||
main process, even you only collect crash report in renderer process.
 | 
			
		||||
**알림:** OS X에선 Windows와 Linux의 `breakpad`와 달리 새로운 `crashpad` 클라이언트를 사용합니다.
 | 
			
		||||
오류 수집 기능을 활성화 시키려면 오류를 수집하고 싶은 메인 프로세스나 랜더러 프로세스에서
 | 
			
		||||
`crashReporter.start` 함수를 호출하여 `crashpad`를 초기화 해야합니다.
 | 
			
		||||
 | 
			
		||||
## crashReporter.getLastCrashReport()
 | 
			
		||||
 | 
			
		||||
Returns the date and ID of last crash report, when there was no crash report
 | 
			
		||||
sent or the crash reporter is not started, `null` will be returned.
 | 
			
		||||
마지막 오류보고의 날짜와 ID를 반환합니다.
 | 
			
		||||
이전 오류보고가 없거나 Crash Reporter가 시작되지 않았을 경우 `null`이 반환됩니다.
 | 
			
		||||
 | 
			
		||||
## crashReporter.getUploadedReports()
 | 
			
		||||
 | 
			
		||||
Returns all uploaded crash reports, each report contains date and uploaded ID.
 | 
			
		||||
모든 업로드된 오류보고를 반환합니다. 각 보고는 날짜와 업로드 ID를 포함하고 있습니다.
 | 
			
		||||
 | 
			
		||||
# crash-reporter payload
 | 
			
		||||
# crash-reporter 오류보고 형식
 | 
			
		||||
 | 
			
		||||
The crash reporter will send the following data to the `submitUrl` as `POST`:
 | 
			
		||||
Crash Reporter는 다음과 같은 데이터를 `submitUrl`에 `POST` 방식으로 전송합니다:
 | 
			
		||||
 | 
			
		||||
* `rept` String - e.g. 'electron-crash-service'
 | 
			
		||||
* `ver` String - The version of Electron
 | 
			
		||||
* `platform` String - e.g. 'win32'
 | 
			
		||||
* `process_type` String - e.g. 'renderer'
 | 
			
		||||
* `rept` String - 예시 'electron-crash-service'
 | 
			
		||||
* `ver` String - Electron의 버전
 | 
			
		||||
* `platform` String - 예시 'win32'
 | 
			
		||||
* `process_type` String - 예시 'renderer'
 | 
			
		||||
* `ptime` Number
 | 
			
		||||
* `_version` String - The version in `package.json`
 | 
			
		||||
* `_productName` String - The product name in the crashReporter `options` object
 | 
			
		||||
* `prod` String - Name of the underlying product. In this case Electron
 | 
			
		||||
* `_companyName` String - The company name in the crashReporter `options` object
 | 
			
		||||
* `upload_file_minidump` File - The crashreport as file
 | 
			
		||||
* All level one properties of the `extra` object in the crashReporter `options` object
 | 
			
		||||
* `_version` String - `package.json`내의 `version` 필드
 | 
			
		||||
* `_productName` String - Crash Reporter의 `options` 객체에서 정의한 제품명.
 | 
			
		||||
* `prod` String - 기본 제품의 이름. 이 경우 Electron으로 표시됩니다.
 | 
			
		||||
* `_companyName` String - Crash Reporter의 `options` 객체에서 정의한 회사명.
 | 
			
		||||
* `upload_file_minidump` File - 오류보고 파일
 | 
			
		||||
* Crash Reporter의 `options` 객체에서 정의한 `extra` 객체의 속성들.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1,17 @@
 | 
			
		|||
# dialog
 | 
			
		||||
 | 
			
		||||
The `dialog` module provides APIs to show native system dialogs, so web
 | 
			
		||||
applications can deliver the same user experience as native applications.
 | 
			
		||||
`dialog` 모듈은 네이티브 시스템의 대화 상자를 조작할 때 사용할 수 있는 API입니다.
 | 
			
		||||
웹 어플리케이션에서 일반 네이티브 어플리케이션과 같은 사용자 경험을 제공할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
An example of showing a dialog to select multiple files and directories:
 | 
			
		||||
다음 예제는 파일과 디렉터리를 다중으로 선택하는 대화 상자를 표시하는 예제입니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var win = ...;  // window in which to show the dialog
 | 
			
		||||
var win = ...;  // 대화 상자를 사용할 창 객체
 | 
			
		||||
var dialog = require('dialog');
 | 
			
		||||
console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', 'multiSelections' ]}));
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**Note for OS X**: If you want to present dialogs as sheets, the only thing you have to do is provide a `BrowserWindow` reference in the `browserWindow` parameter.
 | 
			
		||||
**OS X 주의**: 대화 상자를 시트처럼 보여지게 하려면 `browserWindow` 인자에 `BrowserWindow` 객체의 참조를 제공하면 됩니다.
 | 
			
		||||
 | 
			
		||||
## dialog.showOpenDialog([browserWindow], [options], [callback])
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -20,16 +20,15 @@ console.log(dialog.showOpenDialog({ properties: [ 'openFile', 'openDirectory', '
 | 
			
		|||
  * `title` String
 | 
			
		||||
  * `defaultPath` String
 | 
			
		||||
  * `filters` Array
 | 
			
		||||
  * `properties` Array - Contains which features the dialog should use, can
 | 
			
		||||
    contain `openFile`, `openDirectory`, `multiSelections` and
 | 
			
		||||
    `createDirectory`
 | 
			
		||||
  * `properties` Array - 대화 상자가 사용할 기능(모드)이 담긴 배열입니다.
 | 
			
		||||
    다음을 포함할 수 있습니다: `openFile`, `openDirectory`, `multiSelections`, `createDirectory`
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
On success, returns an array of file paths chosen by the user, otherwise
 | 
			
		||||
returns `undefined`.
 | 
			
		||||
사용할 대화 상자의 기능이 담긴 배열입니다. 다음을 포함할 수 있습니다: `openFile`, `openDirectory`, `multiSelections`, `createDirectory`
 | 
			
		||||
 | 
			
		||||
The `filters` specifies an array of file types that can be displayed or
 | 
			
		||||
selected, an example is:
 | 
			
		||||
작업에 성공하면 유저가 선택한 파일의 경로를 포함한 배열을 반환합니다. 그 외의 경우엔 `undefined`를 반환합니다.
 | 
			
		||||
 | 
			
		||||
`filters`를 지정하면 유저가 선택 가능한 파일 형식을 지정할 수 있습니다. 예제는 다음과 같습니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -41,12 +40,10 @@ selected, an example is:
 | 
			
		|||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If a `callback` is passed, the API call would be asynchronous and the result
 | 
			
		||||
would be passed via `callback(filenames)`
 | 
			
		||||
`callback`이 전달되면 메소드가 비동기로 작동되며 결과는 `callback(filenames)`을 통해 전달됩니다.
 | 
			
		||||
 | 
			
		||||
**Note:** On Windows and Linux, an open dialog can not be both a file selector
 | 
			
		||||
and a directory selector, so if you set `properties` to
 | 
			
		||||
`['openFile', 'openDirectory']` on these platforms, a directory selector will be shown.
 | 
			
		||||
Windows와 Linux에선 파일 선택 모드, 디렉터리 선택 모드를 동시에 사용할 수 없습니다.
 | 
			
		||||
그래서 이 두 플랫폼에선 `properties`를 `['openFile', 'openDirectory']`로 설정하면 디렉터리 선택 대화 상자가 표시됩니다.
 | 
			
		||||
 | 
			
		||||
## dialog.showSaveDialog([browserWindow], [options], [callback])
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -57,36 +54,45 @@ and a directory selector, so if you set `properties` to
 | 
			
		|||
  * `filters` Array
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
On success, returns the path of the file chosen by the user, otherwise returns
 | 
			
		||||
`undefined`.
 | 
			
		||||
작업에 성공하면 
 | 
			
		||||
 | 
			
		||||
The `filters` specifies an array of file types that can be displayed, see
 | 
			
		||||
`dialog.showOpenDialog` for an example.
 | 
			
		||||
작업에 성공하면 유저가 선택한 파일의 경로를 포함한 배열을 반환합니다. 그 외의 경우엔 `undefined`를 반환합니다.
 | 
			
		||||
 | 
			
		||||
If a `callback` is passed, the API call will be asynchronous and the result
 | 
			
		||||
will be passed via `callback(filename)`
 | 
			
		||||
`filters`를 지정하면 유저가 저장 가능한 파일 형식을 지정할 수 있습니다. 사용 방법은 `dialog.showOpenDialog`의 `filters` 속성과 같습니다.
 | 
			
		||||
 | 
			
		||||
`callback`이 전달되면 메소드가 비동기로 작동되며 결과는 `callback(filename)`을 통해 전달됩니다.
 | 
			
		||||
 | 
			
		||||
## dialog.showMessageBox([browserWindow], options, [callback])
 | 
			
		||||
 | 
			
		||||
* `browserWindow` BrowserWindow
 | 
			
		||||
* `options` Object
 | 
			
		||||
  * `type` String - Can be `"none"`, `"info"` or `"warning"`
 | 
			
		||||
  * `buttons` Array - Array of texts for buttons
 | 
			
		||||
  * `title` String - Title of the message box, some platforms will not show it
 | 
			
		||||
  * `message` String - Content of the message box
 | 
			
		||||
  * `detail` String - Extra information of the message
 | 
			
		||||
  * `type` String - `"none"`, `"info"`, `"error"`, `"question"`, `"warning"` 중 하나를 사용할 수 있습니다.
 | 
			
		||||
    Windows에선 따로 `icon`을 설정하지 않은 이상 "question"과 "info"는 같은 아이콘으로 표시됩니다.
 | 
			
		||||
  * `buttons` Array - 버튼들의 라벨을 포함한 배열입니다.
 | 
			
		||||
  * `title` String - 대화 상자의 제목입니다. 몇몇 플랫폼에선 보이지 않을 수 있습니다.
 | 
			
		||||
  * `message` String - 대화 상자의 본문 내용입니다.
 | 
			
		||||
  * `detail` String - 메시지의 추가 정보입니다.
 | 
			
		||||
  * `icon` [NativeImage](native-image-ko.md)
 | 
			
		||||
  * `cancelId` Integer - 유저가 대화 상자의 버튼을 클릭하지 않고 대화 상자를 취소했을 때 반환되는 버튼의 index입니다.
 | 
			
		||||
    기본적으로 버튼 리스트가 "cancel" 또는 "no" 라벨을 가지고 있을 때 해당 버튼의 index를 반환합니다. 따로 두 라벨이 지정되지 않은 경우 0을 반환합니다.
 | 
			
		||||
    OS X와 Windows에선 `cancelId` 지정 여부에 상관없이 "Cancel" 버튼이 언제나 `cancelId`로 지정됩니다.
 | 
			
		||||
  * `noLink` Boolean - Windows Electron은 "Cancel"이나 "Yes"와 같은 흔히 사용되는 버튼을 찾으려고 시도하고
 | 
			
		||||
    대화 상자 내에서 해당 버튼을 커맨드 링크처럼 만듭니다. 이 기능으로 앱을 좀 더 Modern Windows 앱처럼 만들 수 있습니다.
 | 
			
		||||
    이 기능을 원하지 않으면 `noLink`를 true로 지정하면 됩니다.
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
Shows a message box, it will block until the message box is closed. It returns
 | 
			
		||||
the index of the clicked button.
 | 
			
		||||
대화 상자를 표시합니다. `browserWindow`를 지정하면 대화 상자가 완전히 닫힐 때까지는 창을 사용할 수 없습니다.
 | 
			
		||||
완료시 유저가 선택한 버튼의 index를 반환합니다.
 | 
			
		||||
 | 
			
		||||
If a `callback` is passed, the API call will be asynchronous and the result
 | 
			
		||||
will be passed via `callback(response)`
 | 
			
		||||
역주: 부정을 표현하는 "아니오", "취소"와 같은 한글 단어는 지원되지 않습니다.
 | 
			
		||||
만약 OS X 또는 Windows에서 "확인", "취소"와 같은 순서로 버튼을 지정하게 될 때 Alt + f4로 해당 대화 상자를 끄게 되면 "확인"을 누른걸로 판단되어 버립니다.
 | 
			
		||||
이를 해결하려면 "Cancel"을 대신 사용하거나 BrowserWindow API를 사용하여 대화 상자를 직접 구현해야합니다.
 | 
			
		||||
 | 
			
		||||
`callback`이 전달되면 메소드가 비동기로 작동되며 결과는 `callback(response)`을 통해 전달됩니다.
 | 
			
		||||
 | 
			
		||||
## dialog.showErrorBox(title, content)
 | 
			
		||||
 | 
			
		||||
Runs a modal dialog that shows an error message.
 | 
			
		||||
에러 메시지를 보여주는 모달 대화 상자를 표시합니다.
 | 
			
		||||
 | 
			
		||||
This API can be called safely before the `ready` event of `app` module emits, it
 | 
			
		||||
is usually used to report errors in early stage of startup.
 | 
			
		||||
이 API는 `app` 모듈의 `ready` 이벤트가 발생하기 전에 사용할 수 있습니다.
 | 
			
		||||
이 메소드는 보통 어플리케이션이 시작되기 전에 특정한 에러를 표시하기 위해 사용됩니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,62 +1,52 @@
 | 
			
		|||
# Frameless window
 | 
			
		||||
# Frameless 윈도우
 | 
			
		||||
 | 
			
		||||
A frameless window is a window that has no chrome.
 | 
			
		||||
Frameless 윈도우는 테두리가 없는 윈도우 창을 말합니다.
 | 
			
		||||
 | 
			
		||||
## Create a frameless window
 | 
			
		||||
 | 
			
		||||
To create a frameless window, you only need to specify `frame` to `false` in
 | 
			
		||||
[BrowserWindow](browser-window-ko.md)'s `options`:
 | 
			
		||||
## Frameless 윈도우 만들기
 | 
			
		||||
 | 
			
		||||
Frameless 윈도우를 만드려면 [BrowserWindow](browser-window-ko.md) 객체의 `options`에서 `frame` 옵션을 `false`로 지정하기만 하면됩니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var BrowserWindow = require('browser-window');
 | 
			
		||||
var win = new BrowserWindow({ width: 800, height: 600, frame: false });
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Transparent window
 | 
			
		||||
## 투명한 창 만들기
 | 
			
		||||
 | 
			
		||||
By setting the `transparent` option to `true`, you can also make the frameless
 | 
			
		||||
window transparent:
 | 
			
		||||
Frameless 윈도우의 창의 배경을 투명하게 만들고 싶다면 `transparent` 옵션을 `true`로 바꿔주기만 하면됩니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var win = new BrowserWindow({ transparent: true, frame: false });
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### Limitations
 | 
			
		||||
### API의 한계
 | 
			
		||||
 | 
			
		||||
* You can not click through the transparent area, we are going to introduce an
 | 
			
		||||
  API to set window shape to solve this, but currently blocked at an
 | 
			
		||||
  [upstream bug](https://code.google.com/p/chromium/issues/detail?id=387234).
 | 
			
		||||
* Transparent window is not resizable, setting `resizable` to `true` may make
 | 
			
		||||
  transparent window stop working on some platforms.
 | 
			
		||||
* The `blur` filter only applies to the web page, so there is no way to apply
 | 
			
		||||
  blur effect to the content below the window.
 | 
			
		||||
* On Windows transparent window will not work when DWM is disabled.
 | 
			
		||||
* On Linux users have to put `--enable-transparent-visuals --disable-gpu` in
 | 
			
		||||
  command line to disable GPU and allow ARGB to make transparent window, this is
 | 
			
		||||
  caused by an upstream bug that [alpha channel doesn't work on some NVidia
 | 
			
		||||
  drivers](https://code.google.com/p/chromium/issues/detail?id=369209) on Linux.
 | 
			
		||||
* On Mac the native window shadow will not show for transparent window.
 | 
			
		||||
 | 
			
		||||
## Draggable region
 | 
			
		||||
 | 
			
		||||
By default, the frameless window is non-draggable. Apps need to specify
 | 
			
		||||
`-webkit-app-region: drag` in CSS to tell Electron which regions are draggable
 | 
			
		||||
(like the OS's standard titlebar), and apps can also use
 | 
			
		||||
`-webkit-app-region: no-drag` to exclude the non-draggable area from the
 | 
			
		||||
 draggable region. Note that only rectangular shape is currently supported.
 | 
			
		||||
* 투명한 영역을 통과하여 클릭할 수 없습니다. 우리는 이 문제를 해결하기 위해 API를 제공할 예정이지만 현재로써는
 | 
			
		||||
  [upstream 버그](https://code.google.com/p/chromium/issues/detail?id=387234)로 인해 중단된 상태입니다.
 | 
			
		||||
* 투명한 창은 크기를 조절할 수 없습니다. `resizable` 속성을 `true`로 할 경우 몇몇 플랫폼에선 윈도우 크래시가 일어납니다.
 | 
			
		||||
* `blur` 필터는 웹 페이지에서만 적용됩니다. 윈도우 아래 컨텐츠에는 블러 효과를 적용할 방법이 없습니다.
 | 
			
		||||
* Windows에선 DWM(데스크톱 창 관리자)가 비활성화되어 있을 경우 작동하지 않습니다.
 | 
			
		||||
* Linux를 사용할 경우 [alpha channel doesn't work on some NVidia drivers](https://code.google.com/p/chromium/issues/detail?id=369209) 
 | 
			
		||||
  upstream 버그가 있으므로 CLI 옵션에 `--enable-transparent-visuals --disable-gpu`을 추가해야 합니다.
 | 
			
		||||
  이 옵션은 GPU의 사용을 중단하고 윈도우를 생성하는데 ARGB를 사용할 수 있도록 해줍니다.
 | 
			
		||||
* OS X(Mac)에선 네이티브 윈도우의 그림자가 투명한 창에선 보이지 않습니다.
 | 
			
		||||
 | 
			
		||||
To make the whole window draggable, you can add `-webkit-app-region: drag` as
 | 
			
		||||
`body`'s style:
 | 
			
		||||
## 드래그 가능 위치 지정
 | 
			
		||||
 | 
			
		||||
기본적으로 Frameless 윈도우는 드래그 할 수 없습니다.
 | 
			
		||||
어플리케이션의 CSS에서 특정 범위를 `-webkit-app-region: drag`로 지정하면 OS의 기본 타이틀바 처럼 드래그 되도록 할 수 있습니다.
 | 
			
		||||
그리고 `-webkit-app-region: no-drag`를 지정해서 드래그 불가능 영역을 만들 수도 있습니다. 현재 사각형 형태의 범위만 지원합니다.
 | 
			
		||||
 | 
			
		||||
창 전체를 드래그 가능하게 만드려면 `-webkit-app-region: drag`을 `body`의 스타일에 지정하면 됩니다:
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<body style="-webkit-app-region: drag">
 | 
			
		||||
</body>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
And note that if you have made the whole window draggable, you must also mark
 | 
			
		||||
buttons as non-draggable, otherwise it would be impossible for users to click on
 | 
			
		||||
them:
 | 
			
		||||
참고로 창 전체를 드래그 영역으로 지정할 경우 사용자가 버튼을 클릭할 수 없게 되므로 버튼은 드래그 불가능 영역으로 지정해야 합니다:
 | 
			
		||||
 | 
			
		||||
```css
 | 
			
		||||
button {
 | 
			
		||||
| 
						 | 
				
			
			@ -64,15 +54,13 @@ button {
 | 
			
		|||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If you're only using a custom titlebar, you also need to make buttons in
 | 
			
		||||
titlebar non-draggable.
 | 
			
		||||
또한 커스텀 타이틀바를 만들어 사용할 때 타이틀바 내부의 버튼도 드래그 불가능 영역으로 지정해야 합니다.
 | 
			
		||||
 | 
			
		||||
## Text selection
 | 
			
		||||
## 텍스트 선택
 | 
			
		||||
 | 
			
		||||
One thing on frameless window is that the dragging behaviour may conflict with
 | 
			
		||||
selecting text, for example, when you drag the titlebar, you may accidentally
 | 
			
		||||
select the text on titlebar. To prevent this, you need to disable text
 | 
			
		||||
selection on dragging area like this:
 | 
			
		||||
한가지, Frameless 윈도우에서 텍스트가 선택되는 드래그 동작은 혼란을 야기할 수 있습니다.
 | 
			
		||||
예를 들어 타이틀바를 드래그 할 때 타이틀바의 텍스트를 실수로 선택할 수 있습니다.
 | 
			
		||||
이를 방지하기 위해선 다음과 같이 드래그 영역의 텍스트 선택 동작을 비활성화해야 할 필요가 있습니다:
 | 
			
		||||
 | 
			
		||||
```css
 | 
			
		||||
.titlebar {
 | 
			
		||||
| 
						 | 
				
			
			@ -81,9 +69,7 @@ selection on dragging area like this:
 | 
			
		|||
}
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Context menu
 | 
			
		||||
## 컨텍스트 메뉴
 | 
			
		||||
 | 
			
		||||
On some platforms, the draggable area would be treated as non-client frame, so
 | 
			
		||||
when you right click on it a system menu would be popuped. To make context menu
 | 
			
		||||
behave correctly on all platforms, you should never custom context menu on
 | 
			
		||||
draggable areas.
 | 
			
		||||
몇몇 플랫폼에선 드래그 가능 영역이 non-client 프레임으로 처리됩니다. 그래서 이 영역에서 오른쪽 클릭을 할 경우 시스템 메뉴가 팝업 됩니다.
 | 
			
		||||
그래서 컨텍스트 메뉴 지정이 모든 플랫폼에서 정상적으로 작동하게 하려면 커스텀 컨텍스트 메뉴를 드래그 영역 내에 만들어선 안됩니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,11 +1,15 @@
 | 
			
		|||
# global-shortcut
 | 
			
		||||
 | 
			
		||||
`global-shortcut` 모듈은 사용자가 다양한 단축키 작업을 정의 할 수 있도록 운영체제의 전역 키보드 단축키를 설정 등록/해제 하는 방법을 제공합니다.
 | 
			
		||||
`global-shortcut` 모듈은 운영체제의 전역 키보드 단축키를 설정 등록/해제 하는 방법을 제공합니다.
 | 
			
		||||
이 모듈을 사용하여 사용자가 다양한 단축키 작업을 할 수 있도록 단축키를 정의 할 수 있습니다.
 | 
			
		||||
참고로 설정된 단축키는 어플리케이션이 백그라운드로 작동(창이 포커스 되지 않음) 할 때도 여전히 계속 작동합니다.
 | 
			
		||||
이 모듈은 `app` 모듈의 `ready` 이벤트 이전에 사용할 수 없습니다.
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var app = require('app');
 | 
			
		||||
var globalShortcut = require('global-shortcut');
 | 
			
		||||
 | 
			
		||||
app.on('ready', function() {
 | 
			
		||||
  // 'ctrl+x' 단축키를 리스너에 등록합니다.
 | 
			
		||||
  var ret = globalShortcut.register('ctrl+x', function() { console.log('ctrl+x is pressed'); })
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -15,12 +19,15 @@ if (!ret) {
 | 
			
		|||
 | 
			
		||||
  // 단축키가 등록되었는지 확인합니다.
 | 
			
		||||
  console.log(globalShortcut.isRegistered('ctrl+x'));
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
app.on('will-quit', function() {
 | 
			
		||||
  // 단축키의 등록을 해제합니다.
 | 
			
		||||
  globalShortcut.unregister('ctrl+x');
 | 
			
		||||
 | 
			
		||||
  // 모든 단축키의 등록을 해제합니다.
 | 
			
		||||
  globalShortcut.unregisterAll();
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## globalShortcut.register(accelerator, callback)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +1,10 @@
 | 
			
		|||
# menu
 | 
			
		||||
 | 
			
		||||
The `Menu` class is used to create native menus that can be used as
 | 
			
		||||
application menus and context menus. Each menu consists of multiple menu
 | 
			
		||||
items, and each menu item can have a submenu.
 | 
			
		||||
`Menu` 클래스는 어플리케이션 메뉴와 컨텍스트 메뉴를 만들 때 사용할 수 있습니다.
 | 
			
		||||
각 메뉴는 여러 개의 메뉴 아이템으로 구성되어 있으며 서브 메뉴를 가질 수도 있습니다.
 | 
			
		||||
 | 
			
		||||
Below is an example of creating a menu dynamically in a web page by using
 | 
			
		||||
the [remote](remote-ko.md) module, and showing it when the user right clicks
 | 
			
		||||
the page:
 | 
			
		||||
다음 예제는 웹 페이지 내에서 [remote](remote-ko.md) 모듈을 활용하여 동적으로 메뉴를 생성하는 예제입니다.
 | 
			
		||||
그리고 이 예제에서 만들어진 메뉴는 유저가 페이지에서 오른쪽 클릭을 할 때 마우스 위치에 팝업으로 표시됩니다:
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<!-- index.html -->
 | 
			
		||||
| 
						 | 
				
			
			@ -27,7 +25,9 @@ window.addEventListener('contextmenu', function (e) {
 | 
			
		|||
</script>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Another example of creating the application menu with the simple template API:
 | 
			
		||||
다음 예제는 template API를 활용하여 어플리케이션 메뉴를 만드는 간단한 예제입니다:
 | 
			
		||||
 | 
			
		||||
**Windows 와 Linux 주의:** 각 메뉴 아이템의 `selector` 멤버는 Mac 운영체제 전용입니다. [Accelerator 옵션](https://github.com/atom/electron/blob/master/docs/api/accelerator-ko.md)
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<!-- index.html -->
 | 
			
		||||
| 
						 | 
				
			
			@ -54,12 +54,12 @@ var template = [
 | 
			
		|||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Hide Electron',
 | 
			
		||||
        accelerator: 'Command+H',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+H',
 | 
			
		||||
        selector: 'hide:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Hide Others',
 | 
			
		||||
        accelerator: 'Command+Shift+H',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+Shift+H',
 | 
			
		||||
        selector: 'hideOtherApplications:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
| 
						 | 
				
			
			@ -71,7 +71,7 @@ var template = [
 | 
			
		|||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Quit',
 | 
			
		||||
        accelerator: 'Command+Q',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+Q',
 | 
			
		||||
        selector: 'terminate:'
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
| 
						 | 
				
			
			@ -81,12 +81,12 @@ var template = [
 | 
			
		|||
    submenu: [
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Undo',
 | 
			
		||||
        accelerator: 'Command+Z',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+Z',
 | 
			
		||||
        selector: 'undo:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Redo',
 | 
			
		||||
        accelerator: 'Shift+Command+Z',
 | 
			
		||||
        accelerator: 'Shift+CmdOrCtrl+Z',
 | 
			
		||||
        selector: 'redo:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
| 
						 | 
				
			
			@ -94,22 +94,22 @@ var template = [
 | 
			
		|||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Cut',
 | 
			
		||||
        accelerator: 'Command+X',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+X',
 | 
			
		||||
        selector: 'cut:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Copy',
 | 
			
		||||
        accelerator: 'Command+C',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+C',
 | 
			
		||||
        selector: 'copy:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Paste',
 | 
			
		||||
        accelerator: 'Command+V',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+V',
 | 
			
		||||
        selector: 'paste:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Select All',
 | 
			
		||||
        accelerator: 'Command+A',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+A',
 | 
			
		||||
        selector: 'selectAll:'
 | 
			
		||||
      }
 | 
			
		||||
    ]
 | 
			
		||||
| 
						 | 
				
			
			@ -119,12 +119,12 @@ var template = [
 | 
			
		|||
    submenu: [
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Reload',
 | 
			
		||||
        accelerator: 'Command+R',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+R',
 | 
			
		||||
        click: function() { remote.getCurrentWindow().reload(); }
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Toggle DevTools',
 | 
			
		||||
        accelerator: 'Alt+Command+I',
 | 
			
		||||
        accelerator: 'Alt+CmdOrCtrl+I',
 | 
			
		||||
        click: function() { remote.getCurrentWindow().toggleDevTools(); }
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
| 
						 | 
				
			
			@ -134,12 +134,12 @@ var template = [
 | 
			
		|||
    submenu: [
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Minimize',
 | 
			
		||||
        accelerator: 'Command+M',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+M',
 | 
			
		||||
        selector: 'performMiniaturize:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        label: 'Close',
 | 
			
		||||
        accelerator: 'Command+W',
 | 
			
		||||
        accelerator: 'CmdOrCtrl+W',
 | 
			
		||||
        selector: 'performClose:'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
| 
						 | 
				
			
			@ -167,34 +167,30 @@ Menu.setApplicationMenu(menu);
 | 
			
		|||
 | 
			
		||||
### new Menu()
 | 
			
		||||
 | 
			
		||||
Creates a new menu.
 | 
			
		||||
새로운 메뉴를 생성합니다.
 | 
			
		||||
 | 
			
		||||
### Class Method: Menu.setApplicationMenu(menu)
 | 
			
		||||
 | 
			
		||||
* `menu` Menu
 | 
			
		||||
 | 
			
		||||
Sets `menu` as the application menu on OS X. On Windows and Linux, the `menu`
 | 
			
		||||
will be set as each window's top menu.
 | 
			
		||||
지정한 `menu`를 이용하여 어플리케이션 메뉴를 만듭니다. OS X에선 상단바에 표시되며 Windows와 Linux에선 각 창의 상단에 표시됩니다.
 | 
			
		||||
 | 
			
		||||
### Class Method: Menu.sendActionToFirstResponder(action)
 | 
			
		||||
 | 
			
		||||
* `action` String
 | 
			
		||||
 | 
			
		||||
Sends the `action` to the first responder of application, this is used for
 | 
			
		||||
emulating default Cocoa menu behaviors, usually you would just use the
 | 
			
		||||
`selector` property of `MenuItem`.
 | 
			
		||||
`action`을 어플리케이션의 first responder에 전달합니다.
 | 
			
		||||
이 함수는 Cocoa 메뉴 동작을 에뮬레이트 하는데 사용되며 보통 `MenuItem`의 `selector` 속성에 사용됩니다.
 | 
			
		||||
 | 
			
		||||
**Note:** This method is OS X only.
 | 
			
		||||
**알림:** 이 함수는 OS X에서만 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### Class Method: Menu.buildFromTemplate(template)
 | 
			
		||||
 | 
			
		||||
* `template` Array
 | 
			
		||||
 | 
			
		||||
Generally, the `template` is just an array of `options` for constructing
 | 
			
		||||
[MenuItem](menu-item-ko.md), the usage can be referenced above.
 | 
			
		||||
기본적으로 `template`는 [MenuItem](menu-item-ko.md)을 생성할 때 사용하는 `options`의 배열입니다. 사용법은 위에서 설명한 것과 같습니다.
 | 
			
		||||
 | 
			
		||||
You can also attach other fields to element of the `template`, and they will
 | 
			
		||||
become properties of the constructed menu items.
 | 
			
		||||
또한 `template`에는 다른 속성도 추가할 수 있으며 메뉴가 만들어질 때 해당 메뉴 아이템의 프로퍼티로 변환됩니다.
 | 
			
		||||
 | 
			
		||||
### Menu.popup(browserWindow, [x, y])
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -202,86 +198,70 @@ become properties of the constructed menu items.
 | 
			
		|||
* `x` Number
 | 
			
		||||
* `y` Number
 | 
			
		||||
 | 
			
		||||
Popups this menu as a context menu in the `browserWindow`. You can optionally
 | 
			
		||||
provide a `(x,y)` coordinate to place the menu at, otherwise it will be placed
 | 
			
		||||
at the current mouse cursor position.
 | 
			
		||||
메뉴를 `browserWindow` 안에서 팝업으로 표시합니다.
 | 
			
		||||
옵션으로 메뉴를 표시할 `(x,y)` 좌표를 임의로 지정할 수 있습니다. 따로 지정하지 않은 경우 마우스 커서 위치에 표시됩니다.
 | 
			
		||||
 | 
			
		||||
### Menu.append(menuItem)
 | 
			
		||||
 | 
			
		||||
* `menuItem` MenuItem
 | 
			
		||||
 | 
			
		||||
Appends the `menuItem` to the menu.
 | 
			
		||||
메뉴의 리스트 끝에 `menuItem`을 삽입합니다.
 | 
			
		||||
 | 
			
		||||
### Menu.insert(pos, menuItem)
 | 
			
		||||
 | 
			
		||||
* `pos` Integer
 | 
			
		||||
* `menuItem` MenuItem
 | 
			
		||||
 | 
			
		||||
Inserts the `menuItem` to the `pos` position of the menu.
 | 
			
		||||
`pos` 위치에 `menuItem`을 삽입합니다.
 | 
			
		||||
 | 
			
		||||
### Menu.items
 | 
			
		||||
 | 
			
		||||
Get the array containing the menu's items.
 | 
			
		||||
메뉴가 가지고 있는 메뉴 아이템들의 배열입니다.
 | 
			
		||||
 | 
			
		||||
## Notes on OS X application menu
 | 
			
		||||
## OS X 어플리케이션 메뉴에 대해 알아 둬야 할 것들
 | 
			
		||||
 | 
			
		||||
OS X has a completely different style of application menu from Windows and
 | 
			
		||||
Linux, and here are some notes on making your app's menu more native-like.
 | 
			
		||||
OS X에선 Windows, Linux와 달리 완전히 다른 어플리케이션 메뉴 스타일을 가지고 있습니다.
 | 
			
		||||
어플리케이션을 네이티브처럼 작동할 수 있도록 하기 위해선 다음의 몇 가지 유의 사항을 숙지해야 합니다.
 | 
			
		||||
 | 
			
		||||
### Standard menus
 | 
			
		||||
### 기본 메뉴
 | 
			
		||||
 | 
			
		||||
On OS X there are many system defined standard menus, like the `Services` and
 | 
			
		||||
`Windows` menus. To make your menu a standard menu, you can just set your menu's
 | 
			
		||||
label to one of followings, and Electron will recognize them and make them
 | 
			
		||||
become standard menus:
 | 
			
		||||
OS X엔 `Services`나 `Windows`와 같은 많은 시스템 지정 기본 메뉴가 있습니다.
 | 
			
		||||
기본 메뉴를 만들려면 다음 중 하나를 메뉴의 라벨로 지정하기만 하면 됩니다.
 | 
			
		||||
그러면 Electron이 자동으로 인식하여 해당 메뉴를 기본 메뉴로 만듭니다:
 | 
			
		||||
 | 
			
		||||
* `Window`
 | 
			
		||||
* `Help`
 | 
			
		||||
* `Services`
 | 
			
		||||
 | 
			
		||||
### Standard menu item actions
 | 
			
		||||
### 기본 메뉴 아이템 동작
 | 
			
		||||
 | 
			
		||||
OS X has provided standard actions for some menu items (which are called
 | 
			
		||||
`selector`s), like `About xxx`, `Hide xxx`, and `Hide Others`. To set the action
 | 
			
		||||
of a menu item to a standard action, you can set the `selector` attribute of the
 | 
			
		||||
menu item.
 | 
			
		||||
OS X는 몇몇의 메뉴 아이템에 대해 `About xxx`, `Hide xxx`, `Hide Others`와 같은 기본 동작을 제공하고 있습니다. (`selector`라고 불립니다)
 | 
			
		||||
메뉴 아이템의 기본 동작을 지정하려면 메뉴 아이템의 `selector` 속성을 사용하면 됩니다.
 | 
			
		||||
 | 
			
		||||
### Main menu's name
 | 
			
		||||
### 메인 메뉴의 이름
 | 
			
		||||
 | 
			
		||||
On OS X the label of application menu's first item is always your app's name,
 | 
			
		||||
no matter what label you set. To change it you have to change your app's name
 | 
			
		||||
by modifying your app bundle's `Info.plist` file. See
 | 
			
		||||
[About Information Property List Files](https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html)
 | 
			
		||||
for more.
 | 
			
		||||
OS X에선 지정한 어플리케이션 메뉴에 상관없이 메뉴의 첫번째 라벨은 언제나 어플리케이션의 이름이 됩니다.
 | 
			
		||||
어플리케이션 이름을 변경하려면 앱 번들내의 `Info.plist` 파일을 수정해야합니다.
 | 
			
		||||
자세한 내용은 [About Information Property List Files](https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html)을 참고하세요.
 | 
			
		||||
 | 
			
		||||
## 메뉴 아이템 위치
 | 
			
		||||
 | 
			
		||||
## Menu item position
 | 
			
		||||
`Menu.buildFromTemplate`로 메뉴를 만들 때 `position`과 `id`를 사용해서 아이템의 위치를 지정할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
You can make use of `position` and `id` to control how the item would be placed
 | 
			
		||||
when building a menu with `Menu.buildFromTemplate`.
 | 
			
		||||
`MenuItem`의 `position` 속성은 `[placement]=[id]`와 같은 형식을 가지며 `placement`는
 | 
			
		||||
`before`, `after`, `endof` 속성 중 한가지를 사용할 수 있고 `id`는 메뉴 아이템이 가지는 유일 ID 입니다:
 | 
			
		||||
 | 
			
		||||
The `position` attribute of `MenuItem` has the form `[placement]=[id]` where
 | 
			
		||||
placement is one of `before`, `after`, or `endof` and `id` is the unique ID of
 | 
			
		||||
an existing item in the menu:
 | 
			
		||||
* `before` - 이 아이템을 지정한 id 이전의 위치에 삽입합니다. 만약 참조된 아이템이 없을 경우 메뉴의 맨 뒤에 삽입됩니다.
 | 
			
		||||
* `after` - 이 아이템을 지정한 id 다음의 위치에 삽입합니다. 만약 참조된 아이템이 없을 경우 메뉴의 맨 뒤에 삽입됩니다.
 | 
			
		||||
* `endof` - 이 아이템을 id의 논리 그룹에 맞춰서 각 그룹의 항목 뒤에 삽입합니다. (그룹은 분리자 아이템에 의해 만들어집니다)
 | 
			
		||||
  만약 참조된 아이템의 분리자 그룹이 존재하지 않을 경우 지정된 id로 새로운 분리자 그룹을 만든 후 해당 그룹의 뒤에 삽입됩니다.
 | 
			
		||||
 | 
			
		||||
* `before` - Inserts this item before the id referenced item. If the
 | 
			
		||||
  referenced item doesn't exist the item will be inserted at the end of
 | 
			
		||||
  the menu.
 | 
			
		||||
* `after` - Inserts this item after id referenced item. If the referenced
 | 
			
		||||
  item doesn't exist the item will be inserted at the end of the menu.
 | 
			
		||||
* `endof` - Inserts this item at the end of the logical group containing
 | 
			
		||||
  the id referenced item. (Groups are created by separator items). If
 | 
			
		||||
  the referenced item doesn't exist a new separator group is created with
 | 
			
		||||
  the given id and this item is inserted after that separator.
 | 
			
		||||
위치를 지정한 아이템의 뒤에 위치가 지정되지 않은 아이템이 있을 경우 해당 아이템의 위치가 지정되기 전까지 이전에 위치가 지정된 아이템의 위치 지정을 따릅니다.
 | 
			
		||||
이에 따라 위치를 이동하고 싶은 특정 그룹의 아이템들이 있을 경우 해당 그룹의 맨 첫번째 메뉴 아이템의 위치만을 지정하면 됩니다.
 | 
			
		||||
 | 
			
		||||
When an item is positioned following unpositioned items are inserted after
 | 
			
		||||
it, until a new item is positioned. So if you want to position a group of
 | 
			
		||||
menu items in the same location you only need to specify a position for
 | 
			
		||||
the first item.
 | 
			
		||||
### 예제
 | 
			
		||||
 | 
			
		||||
### Examples
 | 
			
		||||
 | 
			
		||||
Template:
 | 
			
		||||
메뉴 템플릿:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
[
 | 
			
		||||
| 
						 | 
				
			
			@ -293,7 +273,7 @@ Template:
 | 
			
		|||
]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Menu:
 | 
			
		||||
메뉴:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
- 1
 | 
			
		||||
| 
						 | 
				
			
			@ -303,7 +283,7 @@ Menu:
 | 
			
		|||
- 5
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Template:
 | 
			
		||||
메뉴 템플릿:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
[
 | 
			
		||||
| 
						 | 
				
			
			@ -316,7 +296,7 @@ Template:
 | 
			
		|||
]
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Menu:
 | 
			
		||||
메뉴:
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
- ---
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -102,7 +102,7 @@ var appIcon = new Tray('/Users/somebody/images/icon.png');
 | 
			
		|||
 | 
			
		||||
### NativeImage.toJpeg(quality)
 | 
			
		||||
 | 
			
		||||
* `quality` Integer
 | 
			
		||||
* `quality` Integer (0 - 100 사이의 값)
 | 
			
		||||
 | 
			
		||||
`JPEG` 이미지를 인코딩한 데이터를 [Buffer][buffer]로 반환합니다.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -124,4 +124,8 @@ var appIcon = new Tray('/Users/somebody/images/icon.png');
 | 
			
		|||
 | 
			
		||||
해당 이미지를 템플릿 이미지로 설정합니다.
 | 
			
		||||
 | 
			
		||||
### NativeImage.isTemplateImage()
 | 
			
		||||
 | 
			
		||||
이미지가 템플릿 이미지인지 확인합니다.
 | 
			
		||||
 | 
			
		||||
[buffer]: https://iojs.org/api/buffer.html#buffer_class_buffer
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,16 +18,16 @@ app.on('ready', function() {
 | 
			
		|||
 | 
			
		||||
## Event: suspend
 | 
			
		||||
 | 
			
		||||
시스템이 절전모드로 진입할 때 호출됩니다.
 | 
			
		||||
시스템이 절전모드로 진입할 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: resume
 | 
			
		||||
 | 
			
		||||
시스템의 절전모드가 해제될 때 호출됩니다.
 | 
			
		||||
시스템의 절전모드가 해제될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: on-ac
 | 
			
		||||
 | 
			
		||||
시스템이 AC 어뎁터 충전기를 사용하기 시작할 때 호출됩니다.
 | 
			
		||||
시스템이 AC 어뎁터 충전기를 사용하기 시작할 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: on-battery
 | 
			
		||||
 | 
			
		||||
시스템이 배터리를 사용하기 시작할 때 호출됩니다.
 | 
			
		||||
시스템이 배터리를 사용하기 시작할 때 발생하는 이벤트입니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,24 +13,32 @@ app.on('ready', function() {
 | 
			
		|||
    protocol.registerProtocol('atom', function(request) {
 | 
			
		||||
      var url = request.url.substr(7)
 | 
			
		||||
      return new protocol.RequestFileJob(path.normalize(__dirname + '/' + url));
 | 
			
		||||
    }, function (error, scheme) {
 | 
			
		||||
      if (!error)
 | 
			
		||||
        console.log(scheme, ' registered successfully')
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
**알림:** 이 모듈은 app의 `ready` 이벤트가 발생한 이후에만 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## protocol.registerProtocol(scheme, handler)
 | 
			
		||||
## protocol.registerProtocol(scheme, handler, callback)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
* `handler` Function
 | 
			
		||||
* `callback` Function 
 | 
			
		||||
 | 
			
		||||
지정한 `scheme`을 기반으로 커스텀 프로토콜을 등록합니다. 등록한 `scheme` 프로토콜에 요청이 들어올 경우 `request` 인자와 함께 `handler` 함수가 호출됩니다.
 | 
			
		||||
지정한 `scheme`을 기반으로 커스텀 프로토콜을 등록합니다. `handler`는 등록한 `scheme` 프로토콜에 요청이 들어올 경우 `request` 인자와 함께 `handler(request)` 형식으로 호출됩니다.
 | 
			
		||||
 | 
			
		||||
호출된 `handler` 함수에선 요청에 대한 해당 프로토콜의 작업 결과를 응답(반환) 해야 할 필요가 있습니다.
 | 
			
		||||
`handler` 함수에선 요청에 대한 해당 프로토콜의 작업 결과를 응답(반환) 해야 합니다.
 | 
			
		||||
 | 
			
		||||
## protocol.unregisterProtocol(scheme)
 | 
			
		||||
기본적으로 스킴은 `http:`와 비슷합니다. `file:`과 같이 "표준 URI 구문"을 다르게 해석되게 하려면
 | 
			
		||||
`protocol.registerStandardSchemes` 메서드를 이용해서 사용자 정의 스킴을 표준 스킴으로 만들 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## protocol.unregisterProtocol(scheme, callback)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
지정한 `scheme` 프로토콜을 등록 해제합니다.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -38,25 +46,32 @@ app.on('ready', function() {
 | 
			
		|||
 | 
			
		||||
* `value` Array
 | 
			
		||||
 | 
			
		||||
지정한 `value` 배열을 사용하여 미리 지정된 스킴으로 등록합니다.
 | 
			
		||||
지정한 `value` 배열을 사용하여 미리 지정된 표준 스킴으로 등록합니다.
 | 
			
		||||
 | 
			
		||||
## protocol.isHandledProtocol(scheme)
 | 
			
		||||
표준 스킴은 RFC 3986 [표준 URI 구문](https://tools.ietf.org/html/rfc3986#section-3)에 해당합니다.
 | 
			
		||||
이 표준은 `file:`과 `filesystem:`을 포함합니다.
 | 
			
		||||
 | 
			
		||||
## protocol.isHandledProtocol(scheme, callback)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
해당 `scheme`에 처리자(handler)가 등록되었는지 확인합니다.
 | 
			
		||||
지정한 `callback`에 결과가 boolean 값으로 반환됩니다.
 | 
			
		||||
 | 
			
		||||
## protocol.interceptProtocol(scheme, handler)
 | 
			
		||||
## protocol.interceptProtocol(scheme, handler, callback)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
* `handler` Function
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
지정한 `scheme`의 작업을 `handler`로 변경합니다.
 | 
			
		||||
`handler`에서 `null` 또는 `undefined`를 반환 할 경우 해당 프로토콜의 기본 동작(응답)으로 대체 됩니다.
 | 
			
		||||
 | 
			
		||||
## protocol.uninterceptProtocol(scheme)
 | 
			
		||||
## protocol.uninterceptProtocol(scheme, callback)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
* `callback` Function
 | 
			
		||||
 | 
			
		||||
변경된 프로토콜의 작업을 해제합니다.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -69,8 +84,8 @@ app.on('ready', function() {
 | 
			
		|||
## Class: protocol.RequestStringJob(options)
 | 
			
		||||
 | 
			
		||||
* `options` Object
 | 
			
		||||
  * `mimeType` String - `text/plain`이 기본
 | 
			
		||||
  * `charset` String - `UTF-8`이 기본
 | 
			
		||||
  * `mimeType` String - 기본값: `text/plain`
 | 
			
		||||
  * `charset` String - 기본값: `UTF-8`
 | 
			
		||||
  * `data` String
 | 
			
		||||
 | 
			
		||||
문자열을 반환하는 request 작업을 생성합니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -78,8 +93,8 @@ app.on('ready', function() {
 | 
			
		|||
## Class: protocol.RequestBufferJob(options)
 | 
			
		||||
 | 
			
		||||
* `options` Object
 | 
			
		||||
  * `mimeType` String - Default is `application/octet-stream`
 | 
			
		||||
  * `encoding` String - Default is `UTF-8`
 | 
			
		||||
  * `mimeType` String - 기본값: `application/octet-stream`
 | 
			
		||||
  * `encoding` String - 기본값: `UTF-8`
 | 
			
		||||
  * `data` Buffer
 | 
			
		||||
 | 
			
		||||
버퍼를 반환하는 request 작업을 생성합니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -87,8 +102,10 @@ app.on('ready', function() {
 | 
			
		|||
## Class: protocol.RequestHttpJob(options)
 | 
			
		||||
 | 
			
		||||
* `options` Object
 | 
			
		||||
  * `session` [Session](browser-window.md#class-session) - 기본적으로 이 옵션은 어플리케이션의 기본 세션입니다.
 | 
			
		||||
    `null`로 설정하면 요청을 위한 새로운 세션을 만듭니다.
 | 
			
		||||
  * `url` String
 | 
			
		||||
  * `method` String - Default is `GET`
 | 
			
		||||
  * `method` String - 기본값: `GET`
 | 
			
		||||
  * `referrer` String
 | 
			
		||||
 | 
			
		||||
`url`의 요청 결과를 그대로 반환하는 request 작업을 생성합니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1,13 @@
 | 
			
		|||
# remote
 | 
			
		||||
 | 
			
		||||
The `remote` module provides a simple way to do inter-process communication
 | 
			
		||||
between the renderer process and the main process.
 | 
			
		||||
`remote` 모듈은 메인 프로세스와 랜더러 프로세스 사이에 inter-process 통신을 간단하게 추상화 한 모듈입니다.
 | 
			
		||||
 | 
			
		||||
In Electron, only GUI-unrelated modules are available in the renderer process.
 | 
			
		||||
Without the `remote` module, users who wanted to call a main process API in
 | 
			
		||||
the renderer process would have to explicitly send inter-process messages
 | 
			
		||||
to the main process. With the `remote` module, users can invoke methods of
 | 
			
		||||
main process object without explicitly sending inter-process messages,
 | 
			
		||||
similar to Java's
 | 
			
		||||
[RMI](http://en.wikipedia.org/wiki/Java_remote_method_invocation).
 | 
			
		||||
Electron의 랜더러 프로세스에선 GUI와 관련 없는 모듈만 사용할 수 있습니다.
 | 
			
		||||
기본적으로 랜더러 프로세스에서 메인 프로세스의 API를 사용하려면 inter-process 통신을 사용해야 합니다.
 | 
			
		||||
하지만 `remote` 모듈을 사용하면 따로 inter-process 통신을 사용하지 않고 직접 명시적으로 사용할 수 있습니다.
 | 
			
		||||
Java의 [RMI](http://en.wikipedia.org/wiki/Java_remote_method_invocation)와 개념이 비슷합니다.
 | 
			
		||||
 | 
			
		||||
An example of creating a browser window in renderer process:
 | 
			
		||||
다음 예제는 랜더러 프로세스에서 브라우저 창을 만드는 예제입니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
| 
						 | 
				
			
			@ -20,51 +16,38 @@ var win = new BrowserWindow({ width: 800, height: 600 });
 | 
			
		|||
win.loadUrl('https://github.com');
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Note: for the reverse (access renderer process from main process), you can use [webContents.executeJavascript](https://github.com/atom/electron/blob/master/docs/api/browser-window-ko.md#browserwindowwebcontents).
 | 
			
		||||
알림: 반대로 하려면(메인 프로세스에서 랜더러 프로세스에 접근) [webContents.executeJavascript](browser-window.md#webcontents-executejavascript-code) API를 사용하면 됩니다.
 | 
			
		||||
 | 
			
		||||
## Remote objects
 | 
			
		||||
## Remote 객체
 | 
			
		||||
 | 
			
		||||
Each object (including functions) returned by the `remote` module represents an
 | 
			
		||||
object in the main process (we call it a remote object or remote function).
 | 
			
		||||
When you invoke methods of a remote object, call a remote function, or create
 | 
			
		||||
a new object with the remote constructor (function), you are actually sending
 | 
			
		||||
synchronous inter-process messages.
 | 
			
		||||
`remote` 모듈로부터 반환된 각 객체(함수 포함)는 메인 프로세스의 객체를 추상화 한 객체입니다. (우리는 그것을 remote 객체 또는 remote 함수라고 부릅니다)
 | 
			
		||||
Remote 모듈의 함수를 호출하거나, 객체에 접근하거나, 생성자로 객체를 생성하는 등의 작업은 실질적으로 동기형 inter-process 메시지를 보냅니다.
 | 
			
		||||
 | 
			
		||||
In the example above, both `BrowserWindow` and `win` were remote objects and
 | 
			
		||||
`new BrowserWindow` didn't create a `BrowserWindow` object in the renderer process.
 | 
			
		||||
Instead, it created a `BrowserWindow` object in the main process and returned the
 | 
			
		||||
corresponding remote object in the renderer process, namely the `win` object.
 | 
			
		||||
위의 예제에서 사용한 두 `BrowserWindow`와 `win`은 remote 객체입니다. 그리고 `new BrowserWindow`이 생성하는 `BrowserWindow` 객체는 랜더러 프로세스에서 생성되지 않습니다.
 | 
			
		||||
대신에 이 `BrowserWindow` 객체는 메인 프로세스에서 생성되며 랜더러 프로세스에 `win` 객체와 같이 이에 대응하는 remote 객체를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## Lifetime of remote objects
 | 
			
		||||
## Remote 객체의 일생
 | 
			
		||||
 | 
			
		||||
Electron makes sure that as long as the remote object in the renderer process
 | 
			
		||||
lives (in other words, has not been garbage collected), the corresponding object
 | 
			
		||||
in the main process would never be released. When the remote object has been
 | 
			
		||||
garbage collected, the corresponding object in the main process would be
 | 
			
		||||
dereferenced.
 | 
			
		||||
Electron은 랜더러 프로세스의 remote 객체가 살아있는 한(다시 말해서 GC(garbage collection)가 일어나지 않습니다) 대응하는 메인 프로세스의 객체는 릴리즈되지 않습니다.
 | 
			
		||||
Remote 객체가 GC 되려면 대응하는 메인 프로세스 내부 객체의 참조가 해제되어야만 합니다.
 | 
			
		||||
 | 
			
		||||
If the remote object is leaked in renderer process (e.g. stored in a map but never
 | 
			
		||||
freed), the corresponding object in the main process would also be leaked,
 | 
			
		||||
so you should be very careful not to leak remote objects.
 | 
			
		||||
만약 remote 객체가 랜더러 프로세스에서 누수가 생겼다면 (예시: 맵에 저장하고 할당 해제하지 않음) 대응하는 메인 프로세스의 객체도 누수가 생깁니다.
 | 
			
		||||
그래서 remote 객체를 사용할 땐 메모리 누수가 생기지 않도록 매우 주의해서 사용해야 합니다.
 | 
			
		||||
 | 
			
		||||
Primary value types like strings and numbers, however, are sent by copy.
 | 
			
		||||
참고로 문자열, 숫자와 같은 원시 값 타입은 복사에 의한 참조로 전달됩니다.
 | 
			
		||||
 | 
			
		||||
## Passing callbacks to the main process
 | 
			
		||||
## 메인 프로세스로 콜백 넘기기
 | 
			
		||||
 | 
			
		||||
Some APIs in the main process accept callbacks, and it would be tempting to
 | 
			
		||||
pass callbacks when calling a remote function. The `remote` module does support
 | 
			
		||||
doing this, but you should also be extremely careful with this.
 | 
			
		||||
몇몇 메인 프로세스의 API는 콜백 함수를 사용합니다. 그리고 보통 remote 함수를 호출할 때 콜백 함수를 넘길 것입니다.
 | 
			
		||||
`remote` 모듈은 이를 지원합니다. 하지만 반드시 주의해서 사용해야 합니다.
 | 
			
		||||
 | 
			
		||||
First, in order to avoid deadlocks, the callbacks passed to the main process
 | 
			
		||||
are called asynchronously, so you should not expect the main process to
 | 
			
		||||
get the return value of the passed callbacks.
 | 
			
		||||
첫째, 데드락을 피하기 위해 메인 프로세스로 전달된 콜백들은 비동기로 호출됩니다.
 | 
			
		||||
그래서 전달된 콜백들이 언제나 값을 반환할 것이라고 기대하면 안 됩니다.
 | 
			
		||||
 | 
			
		||||
Second, the callbacks passed to the main process will not get released
 | 
			
		||||
automatically after they are called. Instead, they will persistent until the
 | 
			
		||||
main process garbage-collects them.
 | 
			
		||||
둘째, 콜백들은 메인 프로세스로 전송되고 호출된 후에도 자동으로 참조가 릴리즈 되지 않습니다.
 | 
			
		||||
참조는 메인 프로세스에서 GC가 일어나기 전까지 계속 남아있게 됩니다.
 | 
			
		||||
 | 
			
		||||
For example, the following code seems innocent at first glance. It installs a
 | 
			
		||||
callback for the `close` event on a remote object:
 | 
			
		||||
다음 코드를 보면 느낌이 팟 하고 올 것입니다. 이 예제는 remote 객체에 `close` 이벤트 콜백을 설치합니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
| 
						 | 
				
			
			@ -73,87 +56,32 @@ remote.getCurrentWindow().on('close', function() {
 | 
			
		|||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The problem is that the callback would be stored in the main process until you
 | 
			
		||||
explicitly uninstall it! So each time you reload your window, the callback would
 | 
			
		||||
be installed again and previous callbacks would just leak. To make things
 | 
			
		||||
worse, since the context of previously installed callbacks have been released,
 | 
			
		||||
when the `close` event was emitted, exceptions would be raised in the main process.
 | 
			
		||||
문제는 이 이벤트는 명시적으로 제거하지 않는 이상 계속해서 메인 프로세스에 남아있게 된다는 것입니다.
 | 
			
		||||
그래서 매 창을 새로고침 할 때마다 콜백이 새롭게 설치되며 이전 콜백은 떨궈져 누수가 됩니다.
 | 
			
		||||
설상가상으로 이전에 설치한 콜백의 콘텍스트가 릴리즈 되고 나서 `close` 이벤트가 발생하면 예외가 발생하고 메인 프로세스가 작동 중지됩니다.
 | 
			
		||||
 | 
			
		||||
Generally, unless you are clear what you are doing, you should always avoid
 | 
			
		||||
passing callbacks to the main process.
 | 
			
		||||
 | 
			
		||||
## Remote buffer
 | 
			
		||||
 | 
			
		||||
An instance of node's `Buffer` is an object, so when you get a `Buffer` from
 | 
			
		||||
the main process, what you get is indeed a remote object (let's call it remote
 | 
			
		||||
buffer), and everything would just follow the rules of remote objects.
 | 
			
		||||
 | 
			
		||||
However you should remember that although a remote buffer behaves like the real
 | 
			
		||||
`Buffer`, it's not a `Buffer` at all. If you pass a remote buffer to node APIs
 | 
			
		||||
that accept a `Buffer`, you should assume the remote buffer would be treated
 | 
			
		||||
like a normal object, instead of a `Buffer`.
 | 
			
		||||
 | 
			
		||||
For example, you can call `BrowserWindow.capturePage` in the renderer process, which
 | 
			
		||||
returns a `Buffer` by calling the passed callback:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
var fs = require('fs');
 | 
			
		||||
remote.getCurrentWindow().capturePage(function(image) {
 | 
			
		||||
  var buf = image.toPng();
 | 
			
		||||
  fs.writeFile('/tmp/screenshot.png', buf, function(err) {
 | 
			
		||||
    console.log(err);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
But you may be surprised to find that the file written was corrupted. This is
 | 
			
		||||
because when you called `fs.writeFile`, thinking that `buf` was a `Buffer` when
 | 
			
		||||
in fact it was a remote buffer, and it was converted to string before it was
 | 
			
		||||
written to the file. Since `buf` contained binary data and could not be represented
 | 
			
		||||
by a UTF-8 encoded string, the written file was corrupted.
 | 
			
		||||
 | 
			
		||||
The work-around is to write the `buf` in the main process, where it is a real
 | 
			
		||||
`Buffer`:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
remote.getCurrentWindow().capturePage(function(image) {
 | 
			
		||||
  var buf = image.toPng();
 | 
			
		||||
  remote.require('fs').writeFile('/tmp/screenshot.png', buf, function(err) {
 | 
			
		||||
    console.log(err);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The same thing could happen for all native types, but usually it would just
 | 
			
		||||
throw a type error. The `Buffer` deserves your special attention because it
 | 
			
		||||
might be converted to string, and APIs accepting `Buffer` usually accept string
 | 
			
		||||
too, and data corruption could happen when it contains binary data.
 | 
			
		||||
일반적으로 정확히 무엇을 할 것인지 잘 알고 있지 않는 이상 웬만하면 메인 프로세스로 콜백 함수를 넘기는 건 자제하는 게 좋습니다.
 | 
			
		||||
 | 
			
		||||
## remote.require(module)
 | 
			
		||||
 | 
			
		||||
* `module` String
 | 
			
		||||
 | 
			
		||||
Returns the object returned by `require(module)` in the main process.
 | 
			
		||||
메인 프로세스의 `require(module)` API를 실행한 후 결과 객체를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## remote.getCurrentWindow()
 | 
			
		||||
 | 
			
		||||
Returns the [BrowserWindow](browser-window-ko.md) object which this web page
 | 
			
		||||
belongs to.
 | 
			
		||||
현재 웹 페이지가 들어있는 [BrowserWindow](browser-window-ko.md) 객체를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## remote.getCurrentWebContent()
 | 
			
		||||
## remote.getCurrentWebContents()
 | 
			
		||||
 | 
			
		||||
Returns the WebContents object of this web page.
 | 
			
		||||
현재 웹 페이지의 WebContents 객체를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## remote.getGlobal(name)
 | 
			
		||||
 | 
			
		||||
* `name` String
 | 
			
		||||
 | 
			
		||||
Returns the global variable of `name` (e.g. `global[name]`) in the main
 | 
			
		||||
process.
 | 
			
		||||
메인 프로세스의 전역 변수(`name`)를 가져옵니다. (예시: `global[name]`)
 | 
			
		||||
 | 
			
		||||
## remote.process
 | 
			
		||||
 | 
			
		||||
Returns the `process` object in the main process. This is the same as
 | 
			
		||||
`remote.getGlobal('process')`, but gets cached.
 | 
			
		||||
메인 프로세스의 `process` 객체를 반환합니다. `remote.getGlobal('process')`와 같습니다. 하지만 캐시 됩니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -83,55 +83,6 @@ when the `close` event was emitted, exceptions would be raised in the main proce
 | 
			
		|||
Generally, unless you are clear what you are doing, you should always avoid
 | 
			
		||||
passing callbacks to the main process.
 | 
			
		||||
 | 
			
		||||
## Remote buffer
 | 
			
		||||
 | 
			
		||||
An instance of node's `Buffer` is an object, so when you get a `Buffer` from
 | 
			
		||||
the main process, what you get is indeed a remote object (let's call it remote
 | 
			
		||||
buffer), and everything would just follow the rules of remote objects.
 | 
			
		||||
 | 
			
		||||
However you should remember that although a remote buffer behaves like the real
 | 
			
		||||
`Buffer`, it's not a `Buffer` at all. If you pass a remote buffer to node APIs
 | 
			
		||||
that accept a `Buffer`, you should assume the remote buffer would be treated
 | 
			
		||||
like a normal object, instead of a `Buffer`.
 | 
			
		||||
 | 
			
		||||
For example, you can call `BrowserWindow.capturePage` in the renderer process, which
 | 
			
		||||
returns a `Buffer` by calling the passed callback:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
var fs = require('fs');
 | 
			
		||||
remote.getCurrentWindow().capturePage(function(image) {
 | 
			
		||||
  var buf = image.toPng();
 | 
			
		||||
  fs.writeFile('/tmp/screenshot.png', buf, function(err) {
 | 
			
		||||
    console.log(err);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
But you may be surprised to find that the file written was corrupted. This is
 | 
			
		||||
because when you called `fs.writeFile`, thinking that `buf` was a `Buffer` when
 | 
			
		||||
in fact it was a remote buffer, and it was converted to string before it was
 | 
			
		||||
written to the file. Since `buf` contained binary data and could not be represented
 | 
			
		||||
by a UTF-8 encoded string, the written file was corrupted.
 | 
			
		||||
 | 
			
		||||
The work-around is to write the `buf` in the main process, where it is a real
 | 
			
		||||
`Buffer`:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var remote = require('remote');
 | 
			
		||||
remote.getCurrentWindow().capturePage(function(image) {
 | 
			
		||||
  var buf = image.toPng();
 | 
			
		||||
  remote.require('fs').writeFile('/tmp/screenshot.png', buf, function(err) {
 | 
			
		||||
    console.log(err);
 | 
			
		||||
  });
 | 
			
		||||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
The same thing could happen for all native types, but usually it would just
 | 
			
		||||
throw a type error. The `Buffer` deserves your special attention because it
 | 
			
		||||
might be converted to string, and APIs accepting `Buffer` usually accept string
 | 
			
		||||
too, and data corruption could happen when it contains binary data.
 | 
			
		||||
 | 
			
		||||
## remote.require(module)
 | 
			
		||||
 | 
			
		||||
* `module` String
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,13 +1,14 @@
 | 
			
		|||
# screen
 | 
			
		||||
 | 
			
		||||
Gets various info about screen size, displays, cursor position, etc. You should
 | 
			
		||||
not use this module until the `ready` event of `app` module gets emitted.
 | 
			
		||||
`screen` 모듈은 화면 크기, 디스플레이, 커서 위치 등등의 다양한 정보를 가져옵니다.
 | 
			
		||||
이 모듈은 `app` 모듈의 `ready` 이벤트가 발생하기 전까지 사용할 수 없습니다.
 | 
			
		||||
 | 
			
		||||
`screen` is an [EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter).
 | 
			
		||||
`screen`은 [EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)를 상속 받았습니다.
 | 
			
		||||
 | 
			
		||||
Make sure to note that in the renderer / DevTools, `window.screen` is a reserved DOM property, so writing `screen = require('screen')` won't work. In our examples below, we use `atomScreen` as the variable name instead.
 | 
			
		||||
한가지 주의할 점은 랜더러 / DevTools에선 이 모듈의 이름인 `screen`은 이미 DOM 속성에 `window.screen`로 존재 하므로 `screen = require('screen')`를
 | 
			
		||||
사용할 수 없습니다. 밑의 예제와 같이 `atomScreen`등의 이름으로 변수 이름을 대체하여 사용해야 합니다.
 | 
			
		||||
 | 
			
		||||
An example of creating a window that fills the whole screen:
 | 
			
		||||
다음 예제는 화면 전체를 채우는 윈도우 창을 생성합니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var app = require('app');
 | 
			
		||||
| 
						 | 
				
			
			@ -22,7 +23,7 @@ app.on('ready', function() {
 | 
			
		|||
});
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Another example of creating a window in the external display:
 | 
			
		||||
다음 예제는 확장 디스플레이에 윈도우를 생성합니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var app = require('app');
 | 
			
		||||
| 
						 | 
				
			
			@ -55,14 +56,14 @@ app.on('ready', function() {
 | 
			
		|||
* `event` Event
 | 
			
		||||
* `newDisplay` Object
 | 
			
		||||
 | 
			
		||||
Emitted when `newDisplay` has been added.
 | 
			
		||||
새로운 디스플레이가 추가되면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: display-removed
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
* `oldDisplay` Object
 | 
			
		||||
 | 
			
		||||
Emitted when `oldDisplay` has been removed.
 | 
			
		||||
기존의 디스플레이가 제거되면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
## Event: display-metrics-changed
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -70,21 +71,21 @@ Emitted when `oldDisplay` has been removed.
 | 
			
		|||
* `display` Object
 | 
			
		||||
* `changedMetrics` Array
 | 
			
		||||
 | 
			
		||||
Emitted when a `display` has one or more metrics changed, `changedMetrics` is
 | 
			
		||||
an array of strings that describe the changes. Possible changes are `bounds`,
 | 
			
		||||
`workArea`, `scaleFactor` and `rotation`.
 | 
			
		||||
`display`의 하나 또는 다수의 매트릭스가 변경될 때 발생하는 이벤트입니다.
 | 
			
		||||
`changedMetrics`는 변경에 대한 정보를 담은 문자열의 배열입니다.
 | 
			
		||||
`bounds`, `workArea`, `scaleFactor`, `rotation`등이 변경될 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## screen.getCursorScreenPoint()
 | 
			
		||||
 | 
			
		||||
Returns the current absolute position of the mouse pointer.
 | 
			
		||||
현재 마우스 포인터의 절대 위치를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## screen.getPrimaryDisplay()
 | 
			
		||||
 | 
			
		||||
Returns the primary display.
 | 
			
		||||
기본 디스플레이를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## screen.getAllDisplays()
 | 
			
		||||
 | 
			
		||||
Returns an array of displays that are currently available.
 | 
			
		||||
사용 가능한 모든 디스플레이를 배열로 반환합니다.
 | 
			
		||||
 | 
			
		||||
## screen.getDisplayNearestPoint(point)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -92,7 +93,7 @@ Returns an array of displays that are currently available.
 | 
			
		|||
  * `x` Integer
 | 
			
		||||
  * `y` Integer
 | 
			
		||||
 | 
			
		||||
Returns the display nearest the specified point.
 | 
			
		||||
지정한 좌표에 가까운 디스플레이를 반환합니다.
 | 
			
		||||
 | 
			
		||||
## screen.getDisplayMatching(rect)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -102,4 +103,4 @@ Returns the display nearest the specified point.
 | 
			
		|||
  * `width` Integer
 | 
			
		||||
  * `height` Integer
 | 
			
		||||
 | 
			
		||||
Returns the display that most closely intersects the provided bounds.
 | 
			
		||||
지정한 범위에 가장 가깝게 교차한 디스플레이를 반환합니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -26,7 +26,7 @@ shell.openExternal('https://github.com');
 | 
			
		|||
* `url` String
 | 
			
		||||
 | 
			
		||||
제공된 외부 프로토콜 URL을 기반으로 데스크톱의 기본 프로그램으로 엽니다. (예를 들어 mailto: URL은 해당 URL을 기본 메일 에이전트로 엽니다.)
 | 
			
		||||
역자주: 폴더는 'file:\\\\C:\\'와 같이 지정하여 열 수 있습니다. (`\\`로 경로를 표현한 이유는 Escape 문자열을 참고하세요.)
 | 
			
		||||
역주: 폴더는 'file:\\\\C:\\'와 같이 지정하여 열 수 있습니다. (`\\`로 경로를 표현한 이유는 Escape 문자열을 참고하세요.)
 | 
			
		||||
 | 
			
		||||
## shell.moveItemToTrash(fullPath)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,8 +24,8 @@ app.on('ready', function(){
 | 
			
		|||
 | 
			
		||||
__플랫폼별 한계:__
 | 
			
		||||
 | 
			
		||||
* OS X에서는 트레이 아이콘이 컨텍스트 메뉴를 가지고 있을 경우 `clicked` 이벤트는 무시됩니다.
 | 
			
		||||
* Linux에서는 앱 알림 표시기(app indicator)가 지원되면 해당 기능을 사용합니다. 만약 지원하지 않으면 `GtkStatusIcon`을 대신 사용합니다.
 | 
			
		||||
* Linux 배포판이 앱 알림 표시기만 지원하고 있다면 `libappindicator1`를 설치하여 트레이 아이콘이 작동하도록 만들 수 있습니다.
 | 
			
		||||
* 앱 알림 표시기는 컨텍스트 메뉴를 가지고 있을 때만 보입니다.
 | 
			
		||||
* Linux에서 앱 알림 표시기가 사용될 경우, `clicked` 이벤트는 무시됩니다.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -44,41 +44,82 @@ __플랫폼별 한계:__
 | 
			
		|||
 | 
			
		||||
### Event: 'clicked'
 | 
			
		||||
 | 
			
		||||
* `event`
 | 
			
		||||
* `event` Event
 | 
			
		||||
  * `altKey` Boolean
 | 
			
		||||
  * `shiftKey` Boolean
 | 
			
		||||
  * `ctrlKey` Boolean
 | 
			
		||||
  * `metaKey` Boolean
 | 
			
		||||
* `bounds` Object - 트레이 아이콘의 범위
 | 
			
		||||
  * `x` Integer
 | 
			
		||||
  * `y` Integer
 | 
			
		||||
  * `width` Integer
 | 
			
		||||
  * `height` Integer
 | 
			
		||||
 | 
			
		||||
트레이 아이콘이 클릭될 때 호출됩니다.
 | 
			
		||||
트레이 아이콘이 클릭될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ `bounds`는 OS X와 Window 7 이후 버전에서만 작동합니다.
 | 
			
		||||
__주의:__ `bounds`는 OS X 와 Windows 7 이후 버전에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'right-clicked'
 | 
			
		||||
 | 
			
		||||
* `event` Event
 | 
			
		||||
  * `altKey` Boolean
 | 
			
		||||
  * `shiftKey` Boolean
 | 
			
		||||
  * `ctrlKey` Boolean
 | 
			
		||||
  * `metaKey` Boolean
 | 
			
		||||
* `bounds` Object - 트레이 아이콘의 범위
 | 
			
		||||
  * `x` Integer
 | 
			
		||||
  * `y` Integer
 | 
			
		||||
  * `width` Integer
 | 
			
		||||
  * `height` Integer
 | 
			
		||||
 | 
			
		||||
트레이 아이콘을 오른쪽 클릭될 때 호출 됩니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 OS X 와 Windows 운영체제에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'double-clicked'
 | 
			
		||||
 | 
			
		||||
트레이 아이콘이 더블 클릭될 때 호출됩니다.
 | 
			
		||||
* `event` Event
 | 
			
		||||
  * `altKey` Boolean
 | 
			
		||||
  * `shiftKey` Boolean
 | 
			
		||||
  * `ctrlKey` Boolean
 | 
			
		||||
  * `metaKey` Boolean
 | 
			
		||||
* `bounds` Object - 트레이 아이콘의 범위
 | 
			
		||||
  * `x` Integer
 | 
			
		||||
  * `y` Integer
 | 
			
		||||
  * `width` Integer
 | 
			
		||||
  * `height` Integer
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 OS X에서만 작동합니다.
 | 
			
		||||
트레이 아이콘이 더블 클릭될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 OS X 와 Windows 운영체제에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'balloon-show'
 | 
			
		||||
 | 
			
		||||
알림풍선이 보여질 때 호출됩니다.
 | 
			
		||||
알림풍선이 보여질 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 Windows에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'balloon-clicked'
 | 
			
		||||
 | 
			
		||||
알림풍선이 클릭될 때 호출됩니다.
 | 
			
		||||
알림풍선이 클릭될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 Windows에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'balloon-closed'
 | 
			
		||||
 | 
			
		||||
알림풍선이 시간이 지나 사라지거나 유저가 클릭하여 닫을 때 호출됩니다.
 | 
			
		||||
알림풍선이 시간이 지나 사라지거나 유저가 클릭하여 닫을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 Windows에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Event: 'drop-files'
 | 
			
		||||
 | 
			
		||||
* `event`
 | 
			
		||||
* `files` Array - 드롭된 파일의 경로
 | 
			
		||||
 | 
			
		||||
트레이 아이콘에 파일이 드롭되면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 OS X에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Tray.destroy()
 | 
			
		||||
 | 
			
		||||
트레이 아이콘을 즉시 삭제시킵니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -130,6 +171,16 @@ __주의:__ 이 기능은 OS X에서만 작동합니다.
 | 
			
		|||
 | 
			
		||||
__알림:__ 이 기능은 Windows에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Tray.popContextMenu([position])
 | 
			
		||||
 | 
			
		||||
* `position` Object - 팝 메뉴 위치
 | 
			
		||||
  * `x` Integer
 | 
			
		||||
  * `y` Integer
 | 
			
		||||
 | 
			
		||||
`position`은 Windows에서만 사용할 수 있으며 기본값은 (0, 0)입니다.
 | 
			
		||||
 | 
			
		||||
__주의:__ 이 기능은 Windows 와 OS X에서만 작동합니다.
 | 
			
		||||
 | 
			
		||||
### Tray.setContextMenu(menu)
 | 
			
		||||
 | 
			
		||||
* `menu` Menu
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
# web-frame
 | 
			
		||||
 | 
			
		||||
`web-frame` 모듈은 현재 웹 페이지의 랜더링 상태를 커스터마이즈 할 수 있도록 해줍니다.
 | 
			
		||||
`web-frame` 모듈은 현재 웹 페이지의 랜더링 상태를 설정 할 수 있도록 해줍니다.
 | 
			
		||||
 | 
			
		||||
다음 예제는 현재 페이지를 200% 줌 합니다.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -54,8 +54,14 @@ require('web-frame').setSpellCheckProvider("en-US", true, {
 | 
			
		|||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
 | 
			
		||||
지정한 `scheme`을 보안 스킴으로 설정합니다.
 | 
			
		||||
지정한 `scheme`을 보안 스킴으로 등록합니다.
 | 
			
		||||
 | 
			
		||||
보안 스킴은 혼합된 컨텐츠 경고를 발생시키지 않습니다. 예를 들어 `https` 와 `data`는 네트워크 공격자로부터 손상될 가능성이 없기 때문에 보안 스킴입니다.
 | 
			
		||||
보안 스킴은 혼합된 컨텐츠 경고를 발생시키지 않습니다. 예를 들어 `https` 와 `data`는 네트워크 공격자로부터 손상될 가능성이 없기 때문에 보안 스킴이라고 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## webFrame.registerUrlSchemeAsBypassingCsp(scheme)
 | 
			
		||||
 | 
			
		||||
* `scheme` String
 | 
			
		||||
 | 
			
		||||
페이지 컨텐츠의 보안 정책에 상관없이 이 `scheme`로부터 리소스가 로드됩니다.
 | 
			
		||||
 | 
			
		||||
[spellchecker]: https://github.com/atom/node-spellchecker
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,31 +1,24 @@
 | 
			
		|||
# `<webview>` 태그
 | 
			
		||||
 | 
			
		||||
Use the `webview` tag to embed 'guest' content (such as web pages) in your
 | 
			
		||||
Electron app. The guest content is contained within the `webview` container;
 | 
			
		||||
an embedder page within your app controls how the guest content is laid out and
 | 
			
		||||
rendered.
 | 
			
		||||
`guest` 컨텐츠(웹 페이지)를 Electron 앱 페이지에 삽입하기 위해 `webview` 태그를 사용할 수 있습니다.
 | 
			
		||||
게스트 컨텐츠는 `webview` 컨테이너에 담겨 대상 페이지에 삽입되고 해당 페이지에선 게스트 컨텐츠의 배치 및 렌더링 과정을 조작할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
Different from the `iframe`, the `webview` runs in a separate process than your
 | 
			
		||||
app; it doesn't have the same permissions as your web page and all interactions
 | 
			
		||||
between your app and embedded content will be asynchronous. This keeps your app
 | 
			
		||||
safe from the embedded content.
 | 
			
		||||
`iframe`과 `webview`의 차이는 어플리케이션과 프로세스가 분리되어 돌아간다는 점입니다.
 | 
			
		||||
그것은 모든 권한이 웹 페이지와 같지 않고 모든 앱과 임베디드(게스트) 컨텐츠간의 상호작용이 비동기로 작동한다는 것을 의미합니다.
 | 
			
		||||
이에 따라 임베디드 컨텐츠로부터 어플리케이션을 안전하게 유지할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## 예제
 | 
			
		||||
 | 
			
		||||
To embed a web page in your app, add the `webview` tag to your app's embedder
 | 
			
		||||
page (this is the app page that will display the guest content). In its simplest
 | 
			
		||||
form, the `webview` tag includes the `src` of the web page and css styles that
 | 
			
		||||
control the appearance of the `webview` container:
 | 
			
		||||
웹 페이지를 어플리케이션에 삽입하려면 `webview` 태그를 사용해 원하는 타겟 페이지에 추가하면 됩니다. (게스트 컨텐츠가 앱 페이지에 추가 됩니다)
 | 
			
		||||
간단한 예로 `webview` 태그의 `src` 속성에 페이지를 지정하고 css 스타일을 이용해서 컨테이너의 외관을 설정할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<webview id="foo" src="https://www.github.com/" style="display:inline-block; width:640px; height:480px"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If you want to control the guest content in any way, you can write JavaScript
 | 
			
		||||
that listens for `webview` events and responds to those events using the
 | 
			
		||||
`webview` methods. Here's sample code with two event listeners: one that listens
 | 
			
		||||
for the web page to start loading, the other for the web page to stop loading,
 | 
			
		||||
and displays a "loading..." message during the load time:
 | 
			
		||||
게스트 컨텐츠를 조작하기 위해 자바스크립트로 `webview` 태그의 이벤트를 리스닝 하여 응답을 받을 수 있습니다.
 | 
			
		||||
다음 예제를 참고하세요: 첫번째 리스너는 페이지 로딩 시작시의 이벤트를 확인하고 두번째 리스너는 페이지의 로딩이 끝난시점을 확인합니다.
 | 
			
		||||
그리고 페이지를 로드하는 동안 "loading..." 메시지를 표시합니다.
 | 
			
		||||
 | 
			
		||||
```html
 | 
			
		||||
<script>
 | 
			
		||||
| 
						 | 
				
			
			@ -53,13 +46,11 @@ and displays a "loading..." message during the load time:
 | 
			
		|||
<webview src="https://www.github.com/"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Returns the visible URL. Writing to this attribute initiates top-level
 | 
			
		||||
navigation.
 | 
			
		||||
지정한 URL을 페이지 소스로 사용합니다. 이 속성을 지정할 경우 `webview`의 최상위 페이지가 됩니다.
 | 
			
		||||
 | 
			
		||||
Assigning `src` its own value will reload the current page.
 | 
			
		||||
`src`에 같은 페이지를 지정하면 페이지를 새로고침합니다.
 | 
			
		||||
 | 
			
		||||
The `src` attribute can also accept data URLs, such as
 | 
			
		||||
`data:text/plain,Hello, world!`.
 | 
			
		||||
`src` 속성은 `data:text/plain,Hello, world!` 같은 data URL도 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### autosize
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -67,11 +58,9 @@ The `src` attribute can also accept data URLs, such as
 | 
			
		|||
<webview src="https://www.github.com/" autosize="on" minwidth="576" minheight="432"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If "on", the `webview` container will automatically resize within the
 | 
			
		||||
bounds specified by the attributes `minwidth`, `minheight`, `maxwidth`, and
 | 
			
		||||
`maxheight`. These contraints do not impact the `webview` UNLESS `autosize` is
 | 
			
		||||
enabled. When `autosize` is enabled, the `webview` container size cannot be less
 | 
			
		||||
than the minimum values or greater than the maximum.
 | 
			
		||||
"on" 으로 지정하면 `webview` 컨테이너는 `minwidth`, `minheight`, `maxwidth`, `maxheight`에 맞춰서 자동으로 크기를 조절합니다.
 | 
			
		||||
이 조건은 `autosize`가 활성화되어있지 않는 한 따로 영향을 주지 않습니다.
 | 
			
		||||
`autosize`가 활성화 되어있으면 `webview` 컨테이너의 크기는 각각의 지정한 최대, 최소값에 따라 조절됩니다.
 | 
			
		||||
 | 
			
		||||
### nodeintegration
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -79,8 +68,8 @@ than the minimum values or greater than the maximum.
 | 
			
		|||
<webview src="http://www.google.com/" nodeintegration></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If "on", the guest page in `webview` will have node integration and can use node
 | 
			
		||||
APIs like `require` and `process` to access low level system resources.
 | 
			
		||||
"on"으로 지정하면 `webview` 페이지 내에서 `require`와 `process 객체`같은 node.js API를 사용할 수 있습니다.
 | 
			
		||||
이를 지정하면 내부에서 로우레벨 리소스에 접근할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### plugins
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +77,7 @@ APIs like `require` and `process` to access low level system resources.
 | 
			
		|||
<webview src="https://www.github.com/" plugins></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If "on", the guest page in `webview` will be able to use browser plugins.
 | 
			
		||||
"on"으로 지정하면 `webview` 내부에서 브라우저 플러그인을 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### preload
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -96,13 +85,12 @@ If "on", the guest page in `webview` will be able to use browser plugins.
 | 
			
		|||
<webview src="https://www.github.com/" preload="./test.js"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Specifies a script that will be loaded before other scripts run in the guest
 | 
			
		||||
page. The protocol of script's URL must be either `file:` or `asar:`, because it
 | 
			
		||||
will be loaded by `require` in guest page under the hood.
 | 
			
		||||
게스트 페이지가 로드되기 전에 실행할 스크립트를 지정합니다.
 | 
			
		||||
스크립트 URL은 `file:` 또는 `asar:` 프로토콜 중 하나를 반드시 사용해야 합니다.
 | 
			
		||||
왜냐하면 `require`를 사용해 게스트 페이지 내에서 스크립트를 로드하기 때문입니다.
 | 
			
		||||
 | 
			
		||||
When the guest page doesn't have node integration this script will still have
 | 
			
		||||
access to all Node APIs, but global objects injected by Node will be deleted
 | 
			
		||||
after this script has done execution.
 | 
			
		||||
게스트 페이지가 nodeintegration을 활성화 하지 않았어도 지정된 스크립트는 정상적으로 돌아갑니다.
 | 
			
		||||
하지만 스크립트 내에서 사용할 수 있는 global 객체는 스크립트 작동이 끝나면 삭제됩니다.
 | 
			
		||||
 | 
			
		||||
### httpreferrer
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -110,7 +98,7 @@ after this script has done execution.
 | 
			
		|||
<webview src="https://www.github.com/" httpreferrer="http://cheng.guru"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Sets the referrer URL for the guest page.
 | 
			
		||||
게스트 페이지의 referrer URL을 설정합니다.
 | 
			
		||||
 | 
			
		||||
### useragent
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -118,7 +106,7 @@ Sets the referrer URL for the guest page.
 | 
			
		|||
<webview src="https://www.github.com/" useragent="Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko"></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Sets the user agent for the guest page before the page is navigated to. Once the page is loaded, use the `setUserAgent` method to change the user agent.
 | 
			
		||||
게스트 페이지의 `User-Agent`를 설정합니다. 페이지가 로드된 후엔 `setUserAgent` 메소드를 사용해서 변경할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### disablewebsecurity
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -126,12 +114,13 @@ Sets the user agent for the guest page before the page is navigated to. Once the
 | 
			
		|||
<webview src="https://www.github.com/" disablewebsecurity></webview>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
If "on", the guest page will have web security disabled.
 | 
			
		||||
"on"으로 지정하면 게스트 페이지의 웹 보안을 해제합니다.
 | 
			
		||||
 | 
			
		||||
## API
 | 
			
		||||
 | 
			
		||||
The webview element must be loaded before using the methods.  
 | 
			
		||||
**Example**
 | 
			
		||||
webview 메서드는 페이지 로드가 끝난 뒤에만 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
**예제**
 | 
			
		||||
```javascript
 | 
			
		||||
webview.addEventListener("dom-ready", function() {
 | 
			
		||||
  webview.openDevTools();
 | 
			
		||||
| 
						 | 
				
			
			@ -140,202 +129,225 @@ webview.addEventListener("dom-ready", function(){
 | 
			
		|||
 | 
			
		||||
### `<webview>`.getUrl()
 | 
			
		||||
 | 
			
		||||
Returns URL of guest page.
 | 
			
		||||
게스트 페이지의 URL을 반환합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.getTitle()
 | 
			
		||||
 | 
			
		||||
Returns the title of guest page.
 | 
			
		||||
게스트 페이지의 제목을 반환합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.isLoading()
 | 
			
		||||
 | 
			
		||||
Returns whether guest page is still loading resources.
 | 
			
		||||
페이지가 아직 리소스를 로딩하고 있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.isWaitingForResponse()
 | 
			
		||||
 | 
			
		||||
Returns whether guest page is waiting for a first-response for the main resource
 | 
			
		||||
of the page.
 | 
			
		||||
게스트 페이지가 메인 리소스의 첫 응답을 기다리고 있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.stop()
 | 
			
		||||
 | 
			
		||||
Stops any pending navigation.
 | 
			
		||||
모든 탐색을 취소합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.reload()
 | 
			
		||||
 | 
			
		||||
Reloads guest page.
 | 
			
		||||
페이지를 새로고침합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.reloadIgnoringCache()
 | 
			
		||||
 | 
			
		||||
Reloads guest page and ignores cache.
 | 
			
		||||
캐시를 무시하고 페이지를 새로고침합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.canGoBack()
 | 
			
		||||
 | 
			
		||||
Returns whether guest page can go back.
 | 
			
		||||
페이지 히스토리를 한 칸 뒤로 가기를 할 수 있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.canGoForward()
 | 
			
		||||
 | 
			
		||||
Returns whether guest page can go forward.
 | 
			
		||||
페이지 히스토리를 한 칸 앞으로 가기를 할 수 있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.canGoToOffset(offset)
 | 
			
		||||
 | 
			
		||||
* `offset` Integer
 | 
			
		||||
 | 
			
		||||
Returns whether guest page can go to `offset`.
 | 
			
		||||
페이지 히스토리를 `offset` 만큼 이동할 수 있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.clearHistory()
 | 
			
		||||
 | 
			
		||||
Clears the navigation history.
 | 
			
		||||
탐색 히스토리를 비웁니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.goBack()
 | 
			
		||||
 | 
			
		||||
Makes guest page go back.
 | 
			
		||||
페이지 뒤로 가기를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.goForward()
 | 
			
		||||
 | 
			
		||||
Makes guest page go forward.
 | 
			
		||||
페이지 앞으로 가기를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.goToIndex(index)
 | 
			
		||||
 | 
			
		||||
* `index` Integer
 | 
			
		||||
 | 
			
		||||
Navigates to the specified absolute index.
 | 
			
		||||
페이지를 지정한 `index`로 이동합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.goToOffset(offset)
 | 
			
		||||
 | 
			
		||||
* `offset` Integer
 | 
			
		||||
 | 
			
		||||
Navigates to the specified offset from the "current entry".
 | 
			
		||||
현재 페이지로 부터 `offset` 만큼 이동합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.isCrashed()
 | 
			
		||||
 | 
			
		||||
Whether the renderer process has crashed.
 | 
			
		||||
랜더러 프로세스가 크래시 됬는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.setUserAgent(userAgent)
 | 
			
		||||
 | 
			
		||||
* `userAgent` String
 | 
			
		||||
 | 
			
		||||
Overrides the user agent for guest page.
 | 
			
		||||
`User-Agent`를 지정합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.getUserAgent()
 | 
			
		||||
 | 
			
		||||
현재 페이지의 `User-Agent` 문자열을 가져옵니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.insertCSS(css)
 | 
			
		||||
 | 
			
		||||
* `css` String
 | 
			
		||||
 | 
			
		||||
Injects CSS into guest page.
 | 
			
		||||
게스트 페이지에 CSS를 삽입합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.executeJavaScript(code)
 | 
			
		||||
### `<webview>`.executeJavaScript(code[, userGesture])
 | 
			
		||||
 | 
			
		||||
* `code` String
 | 
			
		||||
* `userGesture` Boolean
 | 
			
		||||
 | 
			
		||||
Evaluates `code` in guest page.
 | 
			
		||||
게스트 페이지에서 자바스크립트 `code`를 실행합니다.
 | 
			
		||||
 | 
			
		||||
`userGesture`가 `true`로 설정되어 있으면 `requestFullScreen` HTML API 같이
 | 
			
		||||
유저의 승인이 필요한 API를 유저의 승인을 무시하고 개발자가 API를 직접 사용할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
역주: 기본적으로 브라우저에선 전체화면, 웹캠, 파일 열기등의 API를 사용하려면 유저의 승인(이벤트)이 필요합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.openDevTools()
 | 
			
		||||
 | 
			
		||||
Opens a devtools window for guest page.
 | 
			
		||||
게스트 페이지에 대한 개발자 툴을 엽니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.closeDevTools()
 | 
			
		||||
 | 
			
		||||
Closes the devtools window of guest page.
 | 
			
		||||
게스트 페이지에 대한 개발자 툴을 닫습니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.isDevToolsOpened()
 | 
			
		||||
 | 
			
		||||
Returns whether guest page has a devtools window attached.
 | 
			
		||||
게스트 페이지에 대한 개발자 툴이 열려있는지 확인합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.inspectElement(x, y)
 | 
			
		||||
 | 
			
		||||
* `x` Integer
 | 
			
		||||
* `y` Integer
 | 
			
		||||
 | 
			
		||||
Starts inspecting element at position (`x`, `y`) of guest page.
 | 
			
		||||
(`x`, `y`) 위치에 있는 엘리먼트를 inspect합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.inspectServiceWorker()
 | 
			
		||||
 | 
			
		||||
Opens the devtools for the service worker context present in the guest page.
 | 
			
		||||
Service worker에 대한 개발자 툴을 엽니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.undo()
 | 
			
		||||
 | 
			
		||||
Executes editing command `undo` in page.
 | 
			
		||||
페이지에서 실행 취소 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.redo()
 | 
			
		||||
 | 
			
		||||
Executes editing command `redo` in page.
 | 
			
		||||
페이지에서 다시 실행 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.cut()
 | 
			
		||||
 | 
			
		||||
Executes editing command `cut` in page.
 | 
			
		||||
페이지에서 잘라내기 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.copy()
 | 
			
		||||
 | 
			
		||||
Executes editing command `copy` in page.
 | 
			
		||||
페이지에서 복사 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.paste()
 | 
			
		||||
 | 
			
		||||
Executes editing command `paste` in page.
 | 
			
		||||
페이지에서 붙여넣기 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.pasteAndMatchStyle()
 | 
			
		||||
 | 
			
		||||
Executes editing command `pasteAndMatchStyle` in page.
 | 
			
		||||
페이지에서 `pasteAndMatchStyle` 편집 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.delete()
 | 
			
		||||
 | 
			
		||||
Executes editing command `delete` in page.
 | 
			
		||||
페이지에서 삭제 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.selectAll()
 | 
			
		||||
 | 
			
		||||
Executes editing command `selectAll` in page.
 | 
			
		||||
페이지에서 전체 선택 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.unselect()
 | 
			
		||||
 | 
			
		||||
Executes editing command `unselect` in page.
 | 
			
		||||
페이지에서 `unselect` 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.replace(text)
 | 
			
		||||
 | 
			
		||||
* `text` String
 | 
			
		||||
 | 
			
		||||
Executes editing command `replace` in page.
 | 
			
		||||
페이지에서 `replace` 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.replaceMisspelling(text)
 | 
			
		||||
 | 
			
		||||
* `text` String
 | 
			
		||||
 | 
			
		||||
Executes editing command `replaceMisspelling` in page.
 | 
			
		||||
페이지에서 `replaceMisspelling` 커맨드를 실행합니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.print([options])
 | 
			
		||||
 | 
			
		||||
Webview 페이지를 인쇄합니다. `webContents.print([options])` 메서드와 같습니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.printToPDF(options, callback)
 | 
			
		||||
 | 
			
		||||
Webview 페이지를 PDF 형식으로 인쇄합니다. `webContents.printToPDF(options, callback)` 메서드와 같습니다.
 | 
			
		||||
 | 
			
		||||
### `<webview>`.send(channel[, args...])
 | 
			
		||||
 | 
			
		||||
* `channel` String
 | 
			
		||||
 | 
			
		||||
Send `args..` to guest page via `channel` in asynchronous message, the guest
 | 
			
		||||
page can handle it by listening to the `channel` event of `ipc` module.
 | 
			
		||||
`channel`을 통해 게스트 페이지에 `args...` 비동기 메시지를 보냅니다.
 | 
			
		||||
게스트 페이지에선 `ipc` 모듈의 `channel` 이벤트를 사용하면 이 메시지를 받을 수 있습니다.
 | 
			
		||||
 | 
			
		||||
See [WebContents.send](browser-window-ko.md#webcontentssendchannel-args) for
 | 
			
		||||
examples.
 | 
			
		||||
예제는 [WebContents.send](browser-window-ko.md#webcontentssendchannel-args)를 참고하세요.
 | 
			
		||||
 | 
			
		||||
## DOM 이벤트
 | 
			
		||||
 | 
			
		||||
### load-commit
 | 
			
		||||
 | 
			
		||||
* `url` String
 | 
			
		||||
* `isMainFrame` Boolean
 | 
			
		||||
 | 
			
		||||
Fired when a load has committed. This includes navigation within the current
 | 
			
		||||
document as well as subframe document-level loads, but does not include
 | 
			
		||||
asynchronous resource loads.
 | 
			
		||||
 | 
			
		||||
### did-finish-load
 | 
			
		||||
 | 
			
		||||
Fired when the navigation is done, i.e. the spinner of the tab will stop
 | 
			
		||||
spinning, and the `onload` event was dispatched.
 | 
			
		||||
탐색이 끝나면 발생하는 이벤트입니다. 브라우저 탭의 스피너가 멈추고 `onload` 이벤트가 발생될 때를 생각하면 됩니다.
 | 
			
		||||
 | 
			
		||||
### did-fail-load
 | 
			
		||||
 | 
			
		||||
* `errorCode` Integer
 | 
			
		||||
* `errorDescription` String
 | 
			
		||||
 | 
			
		||||
This event is like `did-finish-load`, but fired when the load failed or was
 | 
			
		||||
cancelled, e.g. `window.stop()` is invoked.
 | 
			
		||||
`did-finish-load`와 비슷합니다. 하지만 이 이벤트는 `window.stop()`과 같은 무언가로 인해 로드에 실패했을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### did-frame-finish-load
 | 
			
		||||
 | 
			
		||||
* `isMainFrame` Boolean
 | 
			
		||||
 | 
			
		||||
Fired when a frame has done navigation.
 | 
			
		||||
프레임의 탐색이 끝나면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### did-start-loading
 | 
			
		||||
 | 
			
		||||
Corresponds to the points in time when the spinner of the tab starts spinning.
 | 
			
		||||
브라우저 탭의 스피너가 돌기 시작할 때 처럼 페이지의 로드가 시작될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### did-stop-loading
 | 
			
		||||
 | 
			
		||||
Corresponds to the points in time when the spinner of the tab stops spinning.
 | 
			
		||||
브라우저 탭의 스피너가 멈출 때 처럼 페이지의 로드가 끝나면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### did-get-response-details
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -347,8 +359,8 @@ Corresponds to the points in time when the spinner of the tab stops spinning.
 | 
			
		|||
* `referrer` String
 | 
			
		||||
* `headers` Object
 | 
			
		||||
 | 
			
		||||
Fired when details regarding a requested resource is available.
 | 
			
		||||
`status` indicates socket connection to download the resource.
 | 
			
		||||
요청한 리소스에 관해 자세한 내용을 알 수 있을 때 발생하는 이벤트입니다.
 | 
			
		||||
`status`는 리소스를 다운로드할 소켓 커낵션을 나타냅니다.
 | 
			
		||||
 | 
			
		||||
### did-get-redirect-request
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -356,33 +368,32 @@ Fired when details regarding a requested resource is available.
 | 
			
		|||
* `newUrl` String
 | 
			
		||||
* `isMainFrame` Boolean
 | 
			
		||||
 | 
			
		||||
Fired when a redirect was received while requesting a resource.
 | 
			
		||||
리소스를 요청하고 받는 도중에 리다이렉트가 생기면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### dom-ready
 | 
			
		||||
 | 
			
		||||
Fired when document in the given frame is loaded.
 | 
			
		||||
현재 프레임 문서의 로드가 끝나면 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### page-title-set
 | 
			
		||||
 | 
			
		||||
* `title` String
 | 
			
		||||
* `explicitSet` Boolean
 | 
			
		||||
 | 
			
		||||
Fired when page title is set during navigation. `explicitSet` is false when title is synthesised from file
 | 
			
		||||
url.
 | 
			
		||||
탐색하는 동안에 페이지의 제목이 설정되면 발생하는 이벤트입니다. `explicitSet`는 파일 URL에서 종합(synthesised)된 제목인 경우 false로 표시됩니다.
 | 
			
		||||
 | 
			
		||||
### page-favicon-updated
 | 
			
		||||
 | 
			
		||||
* `favicons` Array - Array of Urls
 | 
			
		||||
 | 
			
		||||
Fired when page receives favicon urls.
 | 
			
		||||
페이지가 favicon URL을 받았을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### enter-html-full-screen
 | 
			
		||||
 | 
			
		||||
Fired when page enters fullscreen triggered by html api.
 | 
			
		||||
페이지가 HTML API에 의해 전체 화면 모드에 돌입했을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### leave-html-full-screen
 | 
			
		||||
 | 
			
		||||
Fired when page leaves fullscreen triggered by html api.
 | 
			
		||||
페이지의 전체 화면 모드가 해제됬을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### console-message
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -391,10 +402,9 @@ Fired when page leaves fullscreen triggered by html api.
 | 
			
		|||
* `line` Integer
 | 
			
		||||
* `sourceId` String
 | 
			
		||||
 | 
			
		||||
Fired when the guest window logs a console message.
 | 
			
		||||
`console.log` API에 의해 로깅될 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
The following example code forwards all log messages to the embedder's console
 | 
			
		||||
without regard for log level or other properties.
 | 
			
		||||
다음 예제는 모든 로그 메시지를 로그 레벨이나 다른 속성에 관련 없이 호스트 페이지의 콘솔에 다시 로깅하는 예제입니다.
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
webview.addEventListener('console-message', function(e) {
 | 
			
		||||
| 
						 | 
				
			
			@ -409,9 +419,9 @@ webview.addEventListener('console-message', function(e) {
 | 
			
		|||
* `disposition` String - Can be `default`, `foreground-tab`, `background-tab`,
 | 
			
		||||
  `new-window` and `other`
 | 
			
		||||
 | 
			
		||||
Fired when the guest page attempts to open a new browser window.
 | 
			
		||||
게스트 페이지가 새로운 브라우저 창을 생성할 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
The following example code opens the new url in system's default browser.
 | 
			
		||||
다음 예제 코드는 새 URL을 시스템의 기본 브라우저로 여는 코드입니다.
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
webview.addEventListener('new-window', function(e) {
 | 
			
		||||
| 
						 | 
				
			
			@ -421,10 +431,9 @@ webview.addEventListener('new-window', function(e) {
 | 
			
		|||
 | 
			
		||||
### close
 | 
			
		||||
 | 
			
		||||
Fired when the guest page attempts to close itself.
 | 
			
		||||
게스트 페이지가 자체적으로 닫힐 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
The following example code navigates the `webview` to `about:blank` when the
 | 
			
		||||
guest attempts to close itself.
 | 
			
		||||
다음 예제 코드는 게스트 페이지가 자체적으로 닫힐 때 `webview`를 `about:blank` 페이지로 이동시키는 예제입니다.
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
webview.addEventListener('close', function() {
 | 
			
		||||
| 
						 | 
				
			
			@ -437,10 +446,9 @@ webview.addEventListener('close', function() {
 | 
			
		|||
* `channel` String
 | 
			
		||||
* `args` Array
 | 
			
		||||
 | 
			
		||||
Fired when the guest page has sent an asynchronous message to embedder page.
 | 
			
		||||
호스트 페이지에서 비동기 IPC 메시지를 보낼 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
With `sendToHost` method and `ipc-message` event you can easily communicate
 | 
			
		||||
between guest page and embedder page:
 | 
			
		||||
`sendToHost` 메소드와 `ipc-message` 이벤트로 호스트 페이지와 쉽게 통신을 할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
// In embedder page.
 | 
			
		||||
| 
						 | 
				
			
			@ -461,19 +469,19 @@ ipc.on('ping', function() {
 | 
			
		|||
 | 
			
		||||
### crashed
 | 
			
		||||
 | 
			
		||||
Fired when the renderer process is crashed.
 | 
			
		||||
랜더러 프로세스가 크래시 되었을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### gpu-crashed
 | 
			
		||||
 | 
			
		||||
Fired when the gpu process is crashed.
 | 
			
		||||
GPU 프로세스가 크래시 되었을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### plugin-crashed
 | 
			
		||||
 | 
			
		||||
* `name` String
 | 
			
		||||
* `version` String
 | 
			
		||||
 | 
			
		||||
Fired when a plugin process is crashed.
 | 
			
		||||
플러그인 프로세스가 크래시 되었을 때 발생하는 이벤트입니다.
 | 
			
		||||
 | 
			
		||||
### destroyed
 | 
			
		||||
 | 
			
		||||
Fired when the WebContents is destroyed.
 | 
			
		||||
WebContents가 파괴될 때 발생하는 이벤트입니다.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ Ubuntu를 사용하고 있다면 다음 커맨드로 설치하면 합니다:
 | 
			
		|||
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
 | 
			
		||||
                       libnotify-dev libgnome-keyring-dev libgconf2-dev \
 | 
			
		||||
                       libasound2-dev libcap-dev libcups2-dev libxtst-dev \
 | 
			
		||||
                       libxss1 gcc-multilib g++-multilib
 | 
			
		||||
                       libxss1 libnss3-dev gcc-multilib g++-multilib
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
다른 배포판의 경우 yum과 같은 패키지 매니저를 통해 패키지를 설치 할 수 있습니다. 패키지의 이름은 대부분 비슷할 것입니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -44,6 +44,21 @@ $ cd electron
 | 
			
		|||
$ ./script/bootstrap.py -v
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 크로스 컴파일
 | 
			
		||||
 | 
			
		||||
`arm` 아키텍쳐로 빌드 하려면 먼저 종속성 라이브러리를 설치해야 합니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo apt-get install libc6-dev-armhf-cross linux-libc-dev-armhf-cross \
 | 
			
		||||
                       g++-arm-linux-gnueabihf
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
그리고 `bootstrap.py` 스크립트의 `--target_arch` 파라미터에 `arm` 또는 `ia32` 아키텍쳐를 지정하여 크로스 컴파일 할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./script/bootstrap.py -v --target_arch=arm
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 빌드 하기
 | 
			
		||||
 | 
			
		||||
`Release` 와 `Debug` 두 타겟 모두 빌드 합니다:
 | 
			
		||||
| 
						 | 
				
			
			@ -83,8 +98,25 @@ $ ./script/clean.py
 | 
			
		|||
 | 
			
		||||
개발 종속성 라이브러리들을 제대로 설치했는지 확인하세요.
 | 
			
		||||
 | 
			
		||||
## libtinfo.so.5 동적 링크 라이브러리를 로드하는 도중 에러가 발생할 경우
 | 
			
		||||
 | 
			
		||||
미리 빌드된 `clang`은 `libtinfo.so.5`로 링크를 시도합니다.
 | 
			
		||||
플랫폼에 따라 적당한 `libncurses` symlink를 추가하세요.
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ sudo ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 테스트
 | 
			
		||||
 | 
			
		||||
프로젝트 코딩 스타일을 확인하려면:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./script/cpplint.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
테스트를 실행하려면:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./script/test.py
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -48,6 +48,14 @@ Electron은 현재 OS X 64비트 빌드만 지원하고 있습니다. 그리고
 | 
			
		|||
 | 
			
		||||
## 테스트
 | 
			
		||||
 | 
			
		||||
프로젝트 코딩 스타일을 확인하려면:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./script/cpplint.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
테스트를 실행하려면:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./script/test.py
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -60,6 +60,14 @@ python script\bootstrap.py -v --target_arch=x64
 | 
			
		|||
 | 
			
		||||
## 테스트
 | 
			
		||||
 | 
			
		||||
프로젝트 코딩 스타일을 확인하려면:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
python script\cpplint.py
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
테스트를 실행하려면:
 | 
			
		||||
 | 
			
		||||
```powershell
 | 
			
		||||
python script\test.py
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +101,7 @@ Traceback (most recent call last):
 | 
			
		|||
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 3
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
이 버그는 Cygwin python과 Win32 node를 같이 사용할 경우 발생합니다.
 | 
			
		||||
이 버그는 Cygwin python과 Win32 node를 같이 사용할 때 발생합니다.
 | 
			
		||||
부트스트랩 스크립트에서 Win32 python을  사용함으로써 이 문제를 해결할 수 있습니다 (`C:\Python27` 디렉터리에 python이 설치되었다는 것을 가정하면):
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -25,9 +25,14 @@ Electron도 상당히 비슷한 접근을 했습니다:
 | 
			
		|||
 | 
			
		||||
## 부트스트랩 최소화
 | 
			
		||||
 | 
			
		||||
모든 사전 빌드 된 Chromium 바이너리들은 부트스트랩 스크립트가 실행될 때 다운로드됩니다.
 | 
			
		||||
Prebuilt된 모든 Chromium 바이너리들은 부트스트랩 스크립트가 실행될 때 다운로드됩니다.
 | 
			
		||||
기본적으로 공유 라이브러리와 정적 라이브러리 모두 다운로드되며 최종 전체 파일 크기는 플랫폼에 따라 800MB에서 2GB까지 차지합니다.
 | 
			
		||||
 | 
			
		||||
기본적으로 libchromiumcontent는 Amazon Web Service를 통해 다운로드 됩니다.
 | 
			
		||||
만약 `LIBCHROMIUMCONTENT_MIRROR` 환경 변수가 설정되어 있으면 부트스트랩은 해당 링크를 사용하여 바이너리를 다운로드 합니다.
 | 
			
		||||
[libchromiumcontent-qiniu-mirror](https://github.com/hokein/libchromiumcontent-qiniu-mirror)는 libchromiumcontent의 미러입니다.
 | 
			
		||||
만약 AWS에 접근할 수 없다면 `export LIBCHROMIUMCONTENT_MIRROR=http://7xk3d2.dl1.z0.glb.clouddn.com/`를 통해 다운로드 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
만약 빠르게 Electron의 개발 또는 테스트만 하고 싶다면 `--dev` 플래그를 추가하여 공유 라이브러리만 다운로드할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -99,7 +99,7 @@ MyApp.app/Contents
 | 
			
		|||
실행파일 `electron`의 이름을 원하는 대로 바꿀 수 있습니다.
 | 
			
		||||
리눅스 어플리케이션의 아이콘은 [.desktop](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) 파일을 사용하여 지정할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### 역자주-자동화 
 | 
			
		||||
### 역주-자동화 
 | 
			
		||||
 | 
			
		||||
배포시에 Electron의 리소스를 일일이 수정하는 것은 매우 귀찮고 복잡합니다.
 | 
			
		||||
하지만 이 작업을 자동화 시킬 수 있는 몇가지 방법이 있습니다: 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
# 어플리케이션 패키징
 | 
			
		||||
 | 
			
		||||
어플리케이션의 리소스와 소스코드를 유저로부터 보호하기 위해 약간의 구조 변경으로 어플리케이션을 [asar][asar] 아카이브로 패키징 할 수 있습니다.
 | 
			
		||||
Windows에서 일어나는 긴 경로 이름에 대한 [issues](https://github.com/joyent/node/issues/6960)를 완화하고 `require` 속도를 약간 빠르게 하며
 | 
			
		||||
어플리케이션의 리소스와 소스코드를 유저로부터 보호하기 위해 어플리케이션을 [asar][asar] 아카이브로 패키징 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
## `asar` 아카이브 생성
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -113,7 +113,56 @@ app.setUserTasks([
 | 
			
		|||
app.setUserTasks([]);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
사용자 작업 리스트는 어플리케이션이 종료되어도 태스크바에 여전히 보존됩니다. 그러므로 어플리케이션이 삭제되기 전까지 이 기능이 제대로 작동하도록 하기 위해 반드시 프로그램 경로와 아이콘 경로를 지정해야 합니다.
 | 
			
		||||
 | 
			
		||||
사용자 작업 리스트는 어플리케이션이 삭제되지 않는 한 종료되어도 태스크바에 보존됩니다. 이러한 이유로 반드시 프로그램 경로와 아이콘 경로를 지정해야 합니다.
 | 
			
		||||
 | 
			
		||||
## 섬네일 툴바
 | 
			
		||||
 | 
			
		||||
Windows에선 작업 표시줄의 어플리케이션 선택시 나오는 미리보기에 특정한 섬네일 툴바를 추가할 수 있습니다.
 | 
			
		||||
이 기능은 유저가 윈도우를 활성화 하지 않고 특정한 커맨드를 실행시킬 수 있도록 할 수 있습니다.
 | 
			
		||||
 | 
			
		||||
MSDN의 설명에 의하면:
 | 
			
		||||
 | 
			
		||||
> 이 툴바는 표준 툴바의 공통 컨트롤과 비슷한 역할을 합니다. 버튼은 최대 7개 까지 만들 수 있습니다.
 | 
			
		||||
> 각 버튼의 구조엔 ID, 이미지, 툴팁, 상태등이 정의되어있습니다. 태스크바에 구조가 전달되면 어플리케이션이
 | 
			
		||||
> 상태에 따라 버튼을 숨기거나, 활성화하거나, 비활성화 할 수 있습니다.
 | 
			
		||||
>
 | 
			
		||||
> 예를 들어, 윈도우 미디어 플레이어는(WMP) 기본적으로
 | 
			
		||||
> 미디어 플레이어가 공통적으로 사용하는 재생, 일시정지, 음소거, 정지등의 컨트롤을 포함하고 있습니다.
 | 
			
		||||
 | 
			
		||||
__Windows Media Player의 섬네일 툴바:__
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
[BrowserWindow.setThumbarButtons][setthumbarbuttons] API를 통해 어플리케이션에 섬네일 툴바를 설정할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
var BrowserWindow = require('browser-window');
 | 
			
		||||
var path = require('path');
 | 
			
		||||
var win = new BrowserWindow({
 | 
			
		||||
  width: 800,
 | 
			
		||||
  height: 600
 | 
			
		||||
});
 | 
			
		||||
win.setThumbarButtons([
 | 
			
		||||
  {
 | 
			
		||||
    tooltip: "button1",
 | 
			
		||||
    icon: path.join(__dirname, 'button1.png'),
 | 
			
		||||
    click: function() { console.log("button2 clicked"); }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    tooltip: "button2",
 | 
			
		||||
    icon: path.join(__dirname, 'button2.png'),
 | 
			
		||||
    flags:['enabled', 'dismissonclick'],
 | 
			
		||||
    click: function() { console.log("button2 clicked."); }
 | 
			
		||||
  }
 | 
			
		||||
]);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
섬네일 툴바를 비우려면 간단히 `BrowserWindow.setThumbarButtons` API에 빈 배열을 전달하면 됩니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
win.setThumbarButtons([]);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Unity 런처 숏컷 기능 (Linux)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -170,3 +219,4 @@ window.setDocumentEdited(true);
 | 
			
		|||
[setdocumentedited]: ../api/browser-window-ko.md#browserwindowsetdocumenteditededited
 | 
			
		||||
[app-registration]: http://msdn.microsoft.com/en-us/library/windows/desktop/ee872121(v=vs.85).aspx
 | 
			
		||||
[unity-launcher]: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles#Adding_shortcuts_to_a_launcher
 | 
			
		||||
[setthumbarbuttons]: ../api/browser-window.md#browserwindowsetthumbarbuttonsbuttons
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,9 @@
 | 
			
		|||
개발자 콘솔 확장기능은 간단하게 사용할 확장기능 플러그인의 소스코드를 다운로드한 후 `BrowserWindow.addDevToolsExtension` API를 이용하여
 | 
			
		||||
어플리케이션 내에 로드할 수 있습니다. 한가지 주의할 점은 확장기능 사용시 창이 생성될 때 마다 일일이 해당 API를 호출할 필요는 없습니다.
 | 
			
		||||
 | 
			
		||||
예시로 [React DevTools Extension](https://github.com/facebook/react-devtools)을 사용 한다면 먼저 소스코드를 다운로드 받고:
 | 
			
		||||
예시로 [React DevTools Extension](https://github.com/facebook/react-devtools)을 사용합니다.
 | 
			
		||||
 | 
			
		||||
먼저 소스코드를 다운로드 받습니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ cd /some-directory
 | 
			
		||||
| 
						 | 
				
			
			@ -18,7 +20,7 @@ $ git clone --recursive https://github.com/facebook/react-devtools.git
 | 
			
		|||
require('remote').require('browser-window').addDevToolsExtension('/some-directory/react-devtools');
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
확장기능을 unload 하려면 `BrowserWindow.removeDevToolsExtension` API를 사용하여 다음에 콘솔을 다시 열 때 해당 확장기능이 로드되지 않도록 할 수 있습니다:
 | 
			
		||||
확장기능을 unload 하고 콘솔을 다시 열 때 해당 확장기능이 로드되지 않도록 하려면 `BrowserWindow.removeDevToolsExtension` API를 사용하면 됩니다:
 | 
			
		||||
 | 
			
		||||
```javascript
 | 
			
		||||
require('remote').require('browser-window').removeDevToolsExtension('React Developer Tools');
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -37,7 +37,7 @@ Electron 프로세스 내에서 작동하는 웹 페이지는 __랜더러 프로
 | 
			
		|||
Electron에는 메인 프로세스와 랜더러 프로세스간에 통신을 할 수 있도록 [ipc](../api/ipc-renderer-ko.md) 모듈을 제공하고 있습니다.
 | 
			
		||||
또한 [remote](../api/remote-ko.md) 모듈을 사용하여 RPC 스타일로 통신할 수도 있습니다.
 | 
			
		||||
 | 
			
		||||
## 나의 첫번째 Electron 앱 만들기
 | 
			
		||||
## 첫번째 Electron 앱 만들기
 | 
			
		||||
 | 
			
		||||
보통 Electron 앱은 다음과 같은 폴더 구조를 가집니다:
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -75,6 +75,8 @@ var mainWindow = null;
 | 
			
		|||
 | 
			
		||||
// 모든 창이 닫히면 어플리케이션 종료.
 | 
			
		||||
app.on('window-all-closed', function() {
 | 
			
		||||
  // OS X의 대부분의 어플리케이션은 유저가 Cmd + Q 커맨드로 확실하게 종료하기 전까지
 | 
			
		||||
  // 메뉴바에 남아 계속 실행됩니다.
 | 
			
		||||
  if (process.platform != 'darwin') {
 | 
			
		||||
    app.quit();
 | 
			
		||||
  }
 | 
			
		||||
| 
						 | 
				
			
			@ -112,30 +114,56 @@ app.on('ready', function() {
 | 
			
		|||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <h1>헬로 월드!</h1>
 | 
			
		||||
    우리는 io.js <script>document.write(process.version)</script> 버전과
 | 
			
		||||
    Electron <script>document.write(process.versions['electron'])</script> 버전을 사용합니다.
 | 
			
		||||
    이 어플리케이션은 io.js <script>document.write(process.version)</script> 과
 | 
			
		||||
    Electron <script>document.write(process.versions['electron'])</script>을 사용합니다.
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## 앱 실행하기
 | 
			
		||||
 | 
			
		||||
앱을 작성한 후 [어플리케이션 배포](./application-distribution-ko.md) 가이드를 따라 앱을 패키징 하고
 | 
			
		||||
패키징한 앱을 실행해 볼 수 있습니다. 또한 Electron 실행파일을 다운로드 받아 바로 실행해 볼 수도 있습니다.
 | 
			
		||||
앱을 작성한 후 [어플리케이션 배포](./application-distribution-ko.md) 가이드를 따라 앱을 패키징 하고 패키징한 앱을 실행할 수 있습니다.
 | 
			
		||||
또는 Electron 실행파일을 다운로드 받아 바로 실행해 볼 수도 있습니다.
 | 
			
		||||
 | 
			
		||||
Windows의 경우:
 | 
			
		||||
### electron-prebuilt
 | 
			
		||||
 | 
			
		||||
`npm`을 통해 `electron-prebuilt` 패키지를 전역에 설치하면 간단한 명령으로 앱을 실행해 볼 수 있습니다.
 | 
			
		||||
 | 
			
		||||
앱 디렉터리 내에서 이렇게 실행합니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
electron .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
또는 앱 디렉터리 밖에서 앱 디렉터리를 입력해도 됩니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
electron app
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
npm 모듈을 로컬에 설치했다면 이렇게 실행할 수 있습니다:
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
./node_modules/.bin/electron .
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
### 임의로 다운로드 받은 Electron
 | 
			
		||||
 | 
			
		||||
만약 Electron 바이너리를 임의로 다운로드 받았다면 다음과 같이 앱 디렉터리에 놓고 실행하면 됩니다.
 | 
			
		||||
 | 
			
		||||
#### Windows
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ .\electron\electron.exe your-app\
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
Linux의 경우:
 | 
			
		||||
#### Linux
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./electron/electron your-app/
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
OS X의 경우:
 | 
			
		||||
#### OS X
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
$ ./Electron.app/Contents/MacOS/Electron your-app/
 | 
			
		||||
| 
						 | 
				
			
			@ -143,3 +171,7 @@ $ ./Electron.app/Contents/MacOS/Electron your-app/
 | 
			
		|||
 | 
			
		||||
앱 실행파일은 `Electron`의 release 패키지에 포함되어 있습니다.
 | 
			
		||||
[여기](https://github.com/atom/electron/releases)에서 다운로드 받을 수 있습니다.
 | 
			
		||||
 | 
			
		||||
### 배포용 파일 만들기
 | 
			
		||||
 | 
			
		||||
모든 앱 작성이 끝났다면 [어플리케이션 배포](./application-distribution-ko.md) 가이드를 보고 본격적으로 제작한 앱을 배포할 수 있습니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
# 네이티브 node 모듈 사용하기
 | 
			
		||||
 | 
			
		||||
__역자주: 현재 Electron은 node.js대신 io.js를 사용합니다. 문서에 기재된 버전과 다를 수 있습니다__
 | 
			
		||||
__역주: 현재 Electron은 node.js대신 io.js를 사용합니다. 문서에 기재된 버전과 다를 수 있습니다__
 | 
			
		||||
 | 
			
		||||
Electron에선 node.js 네이티브 모듈이 지원됩니다. 하지만 Electron은 공식 node.js의 V8 엔진과는 달리 다른 V8 버전을 사용합니다.
 | 
			
		||||
그런 이유로 네이티브 모듈을 사용하기 위해선 Electron의 V8 버전에 맞춰 네이티브 모듈을 다시 빌드하고 헤더를 변경해야 합니다.
 | 
			
		||||
| 
						 | 
				
			
			@ -11,8 +11,7 @@ Node v0.11.x 버전부터는 V8 API의 중대한 변경이 있었습니다. 하
 | 
			
		|||
Node v0.11.x 버전에선 작동하지 않습니다. Electron은 내부적으로 Node v0.11.13 버전을 사용합니다. 그래서 위에서 설명한 문제가 발생합니다.
 | 
			
		||||
 | 
			
		||||
이 문제를 해결하기 위해 모듈이 Node v0.11.x 버전을 지원할 수 있도록 해야합니다.
 | 
			
		||||
현재 [많은 모듈들](https://www.npmjs.org/browse/depended/nan)이 안정적으로 두 버전 모두 지원하고 있지만
 | 
			
		||||
오래된 모듈의 경우 Node v0.10.x 버전만을 지원하고 있습니다.
 | 
			
		||||
현재 [많은 모듈들](https://www.npmjs.org/browse/depended/nan)이 안정적으로 두 버전 모두 지원하고 있지만 오래된 모듈의 경우 Node v0.10.x 버전만을 지원하고 있습니다.
 | 
			
		||||
예를 들어 [nan](https://github.com/rvagg/nan) 모듈을 사용해야 하는 경우 Node v0.11.x 버전으로 포팅 할 필요가 있습니다.
 | 
			
		||||
 | 
			
		||||
## 네이티브 모듈 설치하는 방법
 | 
			
		||||
| 
						 | 
				
			
			@ -35,11 +34,11 @@ Node 모듈을 `node-gyp`를 사용하여 Electron을 타겟으로 빌드할 땐
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
$ cd /path-to-module/
 | 
			
		||||
$ HOME=~/.electron-gyp node-gyp rebuild --target=0.25.0 --arch=ia64 --dist-url=https://atom.io/download/atom-shell
 | 
			
		||||
$ HOME=~/.electron-gyp node-gyp rebuild --target=0.29.1 --arch=x64 --dist-url=https://atom.io/download/atom-shell
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
`HOME=~/.electron-gyp`은 변경할 헤더의 위치를 찾습니다. `--target=0.25.0`은 Electron의 버전입니다.
 | 
			
		||||
`--dist-url=...`은 헤더를 다운로드 하는 주소입니다. `--arch=ia64`는 64비트 시스템을 타겟으로 빌드 한다는 것을 `node-gyp`에게 알려줍니다.
 | 
			
		||||
`HOME=~/.electron-gyp`은 변경할 헤더의 위치를 찾습니다. `--target=0.29.1`은 Electron의 버전입니다.
 | 
			
		||||
`--dist-url=...`은 헤더를 다운로드 하는 주소입니다. `--arch=x64`는 64비트 시스템을 타겟으로 빌드 한다는 것을 `node-gyp`에게 알려줍니다.
 | 
			
		||||
 | 
			
		||||
### npm을 이용한 방법
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +47,7 @@ $ HOME=~/.electron-gyp node-gyp rebuild --target=0.25.0 --arch=ia64 --dist-url=h
 | 
			
		|||
 | 
			
		||||
```bash
 | 
			
		||||
export npm_config_disturl=https://atom.io/download/atom-shell
 | 
			
		||||
export npm_config_target=0.25.0
 | 
			
		||||
export npm_config_target=0.29.1
 | 
			
		||||
export npm_config_arch=x64
 | 
			
		||||
HOME=~/.electron-gyp npm install module-name
 | 
			
		||||
```
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue