Merge pull request #6111 from electron/docs-formatting

Docs formatting
This commit is contained in:
Cheng Zhao 2016-06-24 00:24:57 +00:00 committed by GitHub
commit fa023842d3
7 changed files with 46 additions and 40 deletions

View file

@ -542,11 +542,11 @@ the [close event](#event-close).
### `win.focus()`
Focus on the window.
Focuses on the window.
### `win.blur()`
Remove focus on the window.
Removes focus from the window.
### `win.isFocused()`
@ -945,7 +945,7 @@ convey some sort of application status or to passively notify the user.
### `win.setHasShadow(hasShadow)` _macOS_
* `hasShadow` (Boolean)
* `hasShadow` Boolean
Sets whether the window should have a shadow. On Windows and Linux does
nothing.

View file

@ -117,7 +117,7 @@ Emitted when any dragged items are dropped on the tray icon.
#### Event: 'drop-files' _macOS_
* `event`
* `event` Event
* `files` Array - the file path of dropped files.
Emitted when dragged files are dropped in the tray icon.

View file

@ -339,9 +339,9 @@ Returns:
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
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.
* `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
invoked on.
* `titleText` String - Title or alt text of the selection that the context
@ -356,29 +356,31 @@ Returns:
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`.
* `mediaFlags` Object - The flags for the media element the context menu was
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.
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.
* `isMuted` Boolean - Wether the media element is muted.
* `hasAudio` Boolean - Wether the media element has audio.
* `isLooping` Boolean - Wether the media element is looping.
* `isControlsVisible` Boolean - Wether the media element's controls are
visible.
* `canToggleControls` Boolean - Wether the media element's controls are
toggleable.
* `canRotate` Boolean - Wether the media element can be rotated.
* `inError` Boolean - Whether the media element has crashed.
* `isPaused` Boolean - Whether the media element is paused.
* `isMuted` Boolean - Whether the media element is muted.
* `hasAudio` Boolean - Whether the media element has audio.
* `isLooping` Boolean - Whether the media element is looping.
* `isControlsVisible` Boolean - Whether the media element's controls are
visible.
* `canToggleControls` Boolean - Whether the media element's controls are
toggleable.
* `canRotate` Boolean - Whether the media element can be rotated.
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.
* `canCut` Boolean - Wether the renderer believes it can cut.
* `canCopy` Boolean - Wether the renderer believes it can copy
* `canPaste` Boolean - Wether the renderer believes it can paste.
* `canDelete` Boolean - Wether the renderer believes it can delete.
* `canSelectAll` Boolean - Wether the renderer believes it can select all.
* `canUndo` Boolean - Whether the renderer believes it can undo.
* `canRedo` Boolean - Whether the renderer believes it can redo.
* `canCut` Boolean - Whether the renderer believes it can cut.
* `canCopy` Boolean - Whether the renderer believes it can copy
* `canPaste` Boolean - Whether the renderer believes it can paste.
* `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.