commit
fa023842d3
7 changed files with 46 additions and 40 deletions
|
@ -217,7 +217,7 @@ Menu.setApplicationMenu(menu);
|
||||||
|
|
||||||
새로운 메뉴를 생성합니다.
|
새로운 메뉴를 생성합니다.
|
||||||
|
|
||||||
### Methods
|
## Methods
|
||||||
|
|
||||||
`menu` 클래스는 다음과 같은 메서드를 가지고 있습니다:
|
`menu` 클래스는 다음과 같은 메서드를 가지고 있습니다:
|
||||||
|
|
||||||
|
|
|
@ -1022,7 +1022,7 @@ win.webContents.debugger.sendCommand('Network.enable');
|
||||||
|
|
||||||
지정한 커맨드를 디버깅 대상에게 전송합니다.
|
지정한 커맨드를 디버깅 대상에게 전송합니다.
|
||||||
|
|
||||||
#### Event: 'detach'
|
### Event: 'detach'
|
||||||
|
|
||||||
* `event` Event
|
* `event` Event
|
||||||
* `reason` String - 디버거 분리 사유.
|
* `reason` String - 디버거 분리 사유.
|
||||||
|
@ -1030,7 +1030,7 @@ win.webContents.debugger.sendCommand('Network.enable');
|
||||||
디버깅 세션이 종료될 때 발생하는 이벤트입니다. `webContents`가 닫히거나 개발자 도구가
|
디버깅 세션이 종료될 때 발생하는 이벤트입니다. `webContents`가 닫히거나 개발자 도구가
|
||||||
부착된 `webContents`에 대해 호출될 때 발생합니다.
|
부착된 `webContents`에 대해 호출될 때 발생합니다.
|
||||||
|
|
||||||
#### Event: 'message'
|
### Event: 'message'
|
||||||
|
|
||||||
* `event` Event
|
* `event` Event
|
||||||
* `method` String - 메서드 이름.
|
* `method` String - 메서드 이름.
|
||||||
|
|
|
@ -846,14 +846,14 @@ win.webContents.debugger.sendCommand("Network.enable");
|
||||||
|
|
||||||
发送给定命令给调试目标.
|
发送给定命令给调试目标.
|
||||||
|
|
||||||
#### Event: 'detach'
|
### Event: 'detach'
|
||||||
|
|
||||||
* `event` Event
|
* `event` Event
|
||||||
* `reason` String - 拆分调试器原因.
|
* `reason` String - 拆分调试器原因.
|
||||||
|
|
||||||
在调试 session 结束时发出事件.这在 `webContents` 关闭时或 `webContents` 请求开发者工具栏时发生.
|
在调试 session 结束时发出事件.这在 `webContents` 关闭时或 `webContents` 请求开发者工具栏时发生.
|
||||||
|
|
||||||
#### Event: 'message'
|
### Event: 'message'
|
||||||
|
|
||||||
* `event` Event
|
* `event` Event
|
||||||
* `method` String - 方法名.
|
* `method` String - 方法名.
|
||||||
|
|
|
@ -542,11 +542,11 @@ the [close event](#event-close).
|
||||||
|
|
||||||
### `win.focus()`
|
### `win.focus()`
|
||||||
|
|
||||||
Focus on the window.
|
Focuses on the window.
|
||||||
|
|
||||||
### `win.blur()`
|
### `win.blur()`
|
||||||
|
|
||||||
Remove focus on the window.
|
Removes focus from the window.
|
||||||
|
|
||||||
### `win.isFocused()`
|
### `win.isFocused()`
|
||||||
|
|
||||||
|
@ -945,7 +945,7 @@ convey some sort of application status or to passively notify the user.
|
||||||
|
|
||||||
### `win.setHasShadow(hasShadow)` _macOS_
|
### `win.setHasShadow(hasShadow)` _macOS_
|
||||||
|
|
||||||
* `hasShadow` (Boolean)
|
* `hasShadow` Boolean
|
||||||
|
|
||||||
Sets whether the window should have a shadow. On Windows and Linux does
|
Sets whether the window should have a shadow. On Windows and Linux does
|
||||||
nothing.
|
nothing.
|
||||||
|
|
|
@ -117,7 +117,7 @@ Emitted when any dragged items are dropped on the tray icon.
|
||||||
|
|
||||||
#### Event: 'drop-files' _macOS_
|
#### Event: 'drop-files' _macOS_
|
||||||
|
|
||||||
* `event`
|
* `event` Event
|
||||||
* `files` Array - the file path of dropped files.
|
* `files` Array - the file path of dropped files.
|
||||||
|
|
||||||
Emitted when dragged files are dropped in the tray icon.
|
Emitted when dragged files are dropped in the tray icon.
|
||||||
|
|
|
@ -339,9 +339,9 @@ Returns:
|
||||||
was invoked on. Elements with source URLs are images, audio and video.
|
was invoked on. Elements with source URLs are images, audio and video.
|
||||||
* `mediaType` String - Type of the node the context menu was invoked on. Can
|
* `mediaType` String - Type of the node the context menu was invoked on. Can
|
||||||
be `none`, `image`, `audio`, `video`, `canvas`, `file` or `plugin`.
|
be `none`, `image`, `audio`, `video`, `canvas`, `file` or `plugin`.
|
||||||
* `hasImageContent` Boolean - Wether the context menu was invoked on an image
|
* `hasImageContent` Boolean - Whether the context menu was invoked on an image
|
||||||
which has non-empty contents.
|
which has non-empty contents.
|
||||||
* `isEditable` Boolean - Wether the context is editable.
|
* `isEditable` Boolean - Whether the context is editable.
|
||||||
* `selectionText` String - Text of the selection that the context menu was
|
* `selectionText` String - Text of the selection that the context menu was
|
||||||
invoked on.
|
invoked on.
|
||||||
* `titleText` String - Title or alt text of the selection that the context
|
* `titleText` String - Title or alt text of the selection that the context
|
||||||
|
@ -356,29 +356,31 @@ Returns:
|
||||||
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`.
|
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`.
|
||||||
* `mediaFlags` Object - The flags for the media element the context menu was
|
* `mediaFlags` Object - The flags for the media element the context menu was
|
||||||
invoked on. See more about this below.
|
invoked on. See more about this below.
|
||||||
* `editFlags` Object - These flags indicate wether the renderer believes it is
|
* `editFlags` Object - These flags indicate whether the renderer believes it is
|
||||||
able to perform the corresponding action. See more about this below.
|
able to perform the corresponding action. See more about this below.
|
||||||
|
|
||||||
The `mediaFlags` is an object with the following properties:
|
The `mediaFlags` is an object with the following properties:
|
||||||
* `inError` Boolean - Wether the media element has crashed.
|
|
||||||
* `isPaused` Boolean - Wether the media element is paused.
|
* `inError` Boolean - Whether the media element has crashed.
|
||||||
* `isMuted` Boolean - Wether the media element is muted.
|
* `isPaused` Boolean - Whether the media element is paused.
|
||||||
* `hasAudio` Boolean - Wether the media element has audio.
|
* `isMuted` Boolean - Whether the media element is muted.
|
||||||
* `isLooping` Boolean - Wether the media element is looping.
|
* `hasAudio` Boolean - Whether the media element has audio.
|
||||||
* `isControlsVisible` Boolean - Wether the media element's controls are
|
* `isLooping` Boolean - Whether the media element is looping.
|
||||||
|
* `isControlsVisible` Boolean - Whether the media element's controls are
|
||||||
visible.
|
visible.
|
||||||
* `canToggleControls` Boolean - Wether the media element's controls are
|
* `canToggleControls` Boolean - Whether the media element's controls are
|
||||||
toggleable.
|
toggleable.
|
||||||
* `canRotate` Boolean - Wether the media element can be rotated.
|
* `canRotate` Boolean - Whether the media element can be rotated.
|
||||||
|
|
||||||
The `editFlags` is an object with the following properties:
|
The `editFlags` is an object with the following properties:
|
||||||
* `canUndo` Boolean - Wether the renderer believes it can undo.
|
|
||||||
* `canRedo` Boolean - Wether the renderer believes it can redo.
|
* `canUndo` Boolean - Whether the renderer believes it can undo.
|
||||||
* `canCut` Boolean - Wether the renderer believes it can cut.
|
* `canRedo` Boolean - Whether the renderer believes it can redo.
|
||||||
* `canCopy` Boolean - Wether the renderer believes it can copy
|
* `canCut` Boolean - Whether the renderer believes it can cut.
|
||||||
* `canPaste` Boolean - Wether the renderer believes it can paste.
|
* `canCopy` Boolean - Whether the renderer believes it can copy
|
||||||
* `canDelete` Boolean - Wether the renderer believes it can delete.
|
* `canPaste` Boolean - Whether the renderer believes it can paste.
|
||||||
* `canSelectAll` Boolean - Wether the renderer believes it can select all.
|
* `canDelete` Boolean - Whether the renderer believes it can delete.
|
||||||
|
* `canSelectAll` Boolean - Whether the renderer believes it can select all.
|
||||||
|
|
||||||
Emitted when there is a new context menu that needs to be handled.
|
Emitted when there is a new context menu that needs to be handled.
|
||||||
|
|
||||||
|
|
|
@ -51,14 +51,12 @@ Here are some tips for understanding Electron documentation syntax.
|
||||||
An example of [method](https://developer.mozilla.org/en-US/docs/Glossary/Method)
|
An example of [method](https://developer.mozilla.org/en-US/docs/Glossary/Method)
|
||||||
documentation:
|
documentation:
|
||||||
|
|
||||||
---
|
```
|
||||||
|
|
||||||
`methodName(required[, optional]))`
|
`methodName(required[, optional]))`
|
||||||
|
|
||||||
* `require` String (**required**)
|
* `required` String (**required**)
|
||||||
* `optional` Integer
|
* `optional` Integer
|
||||||
|
```
|
||||||
---
|
|
||||||
|
|
||||||
The method name is followed by the arguments it takes. Optional arguments are
|
The method name is followed by the arguments it takes. Optional arguments are
|
||||||
notated by brackets surrounding the optional argument as well as the comma
|
notated by brackets surrounding the optional argument as well as the comma
|
||||||
|
@ -72,20 +70,26 @@ of argument is notated by either the common types:
|
||||||
[`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
[`Array`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
||||||
or a custom type like Electron's [`webContent`](api/web-content.md).
|
or a custom type like Electron's [`webContent`](api/web-content.md).
|
||||||
|
|
||||||
|
If an argument is unique to certain platforms, those platforms are denoted
|
||||||
|
using a space-delimited italicized list following the datatype. Values can be
|
||||||
|
`macOS`, `Windows`, or `Linux`.
|
||||||
|
|
||||||
|
```
|
||||||
|
* `animate` Boolean (optional) _macOS_ _Windows_
|
||||||
|
```
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
An example of [event](https://developer.mozilla.org/en-US/docs/Web/API/Event)
|
An example of [event](https://developer.mozilla.org/en-US/docs/Web/API/Event)
|
||||||
documentation:
|
documentation:
|
||||||
|
|
||||||
---
|
```
|
||||||
|
|
||||||
Event: 'wake-up'
|
Event: 'wake-up'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
* `time` String
|
* `time` String
|
||||||
|
```
|
||||||
---
|
|
||||||
|
|
||||||
The event is a string that is used after a `.on` listener method. If it returns
|
The event is a string that is used after a `.on` listener method. If it returns
|
||||||
a value it and its type is noted below. If you were to listen and respond to
|
a value it and its type is noted below. If you were to listen and respond to
|
||||||
|
@ -93,6 +97,6 @@ this event it might look something like this:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
Alarm.on('wake-up', (time) => {
|
Alarm.on('wake-up', (time) => {
|
||||||
console.log(time);
|
console.log(time)
|
||||||
});
|
})
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue