remove all double spaces not needed

This commit is contained in:
Toinane 2017-11-29 11:58:24 +01:00
parent 323ea2b27b
commit 0a0d88a5dc
No known key found for this signature in database
GPG key ID: 1A3729C1B6D59115
18 changed files with 73 additions and 73 deletions

View file

@ -377,7 +377,7 @@ returning `false` in the `beforeunload` event handler.
* `exitCode` Integer (optional)
Exits immediately with `exitCode`. `exitCode` defaults to 0.
Exits immediately with `exitCode`. `exitCode` defaults to 0.
All windows will be closed immediately without asking user and the `before-quit`
and `will-quit` events will not be emitted.
@ -459,7 +459,7 @@ You can request the following paths by the name:
* `pictures` Directory for a user's pictures.
* `videos` Directory for a user's videos.
* `logs` Directory for your app's log folder.
* `pepperFlashSystemPlugin` Full path to the system version of the Pepper Flash plugin.
* `pepperFlashSystemPlugin` Full path to the system version of the Pepper Flash plugin.
### `app.getFileIcon(path[, options], callback)`
@ -846,12 +846,12 @@ This method can only be called before app is ready.
### `app.getAppMemoryInfo()` _Deprecated_
Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetric` objects that correspond to memory and cpu usage statistics of all the processes associated with the app.
Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetric` objects that correspond to memory and cpu usage statistics of all the processes associated with the app.
**Note:** This method is deprecated, use `app.getAppMetrics()` instead.
### `app.getAppMetrics()`
Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetric` objects that correspond to memory and cpu usage statistics of all the processes associated with the app.
Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetric` objects that correspond to memory and cpu usage statistics of all the processes associated with the app.
### `app.getGPUFeatureStatus()`
@ -998,11 +998,11 @@ This method can only be called before app is ready.
### `app.isInApplicationsFolder()` _macOS_
Returns `Boolean` - Whether the application is currently running from the
systems Application folder. Use in combination with `app.moveToApplicationsFolder()`
systems Application folder. Use in combination with `app.moveToApplicationsFolder()`
### `app.moveToApplicationsFolder()` _macOS_
Returns `Boolean` - Whether the move was successful. Please note that if
Returns `Boolean` - Whether the move was successful. Please note that if
the move is successful your application will quit and relaunch.
No confirmation dialog will be presented by default, if you wish to allow
@ -1010,9 +1010,9 @@ the user to confirm the operation you may do so using the
[`dialog`](dialog.md) API.
**NOTE:** This method throws errors if anything other than the user causes the
move to fail. For instance if the user cancels the authorization dialog this
method returns false. If we fail to perform the copy then this method will
throw an error. The message in the error should be informative and tell
move to fail. For instance if the user cancels the authorization dialog this
method returns false. If we fail to perform the copy then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong
### `app.dock.bounce([type])` _macOS_

View file

@ -102,7 +102,7 @@ ID.
### `crashReporter.getUploadToServer()` _Linux_ _macOS_
Returns `Boolean` - Whether reports should be submitted to the server. Set through
Returns `Boolean` - Whether reports should be submitted to the server. Set through
the `start` method or `setUploadToServer`.
**Note:** This API can only be called from the main process.

View file

@ -44,7 +44,7 @@ The `dialog` module has the following methods:
the path but allows non-existent paths to be returned that should be
created by the application.
* `noResolveAliases` _macOS_ - Disable the automatic alias (symlink) path
resolution. Selected aliases will now return the alias path instead of
resolution. Selected aliases will now return the alias path instead of
their target path.
* `treatPackageAsDirectory` _macOS_ - Treat packages, such as `.app` folders,
as a directory instead of a file.
@ -175,7 +175,7 @@ will be asynchronous and the result will be passed via `callback(response)`.
Displays a modal dialog that shows an error message.
This API can be called safely before the `ready` event the `app` module emits,
it is usually used to report errors in early stage of startup. If called
it is usually used to report errors in early stage of startup. If called
before the app `ready`event on Linux, the message will be emitted to stderr,
and no GUI dialog will appear.

View file

@ -147,7 +147,7 @@ header.
#### `downloadItem.getState()`
Returns `String` - The current state. Can be `progressing`, `completed`, `cancelled` or `interrupted`.
Returns `String` - The current state. Can be `progressing`, `completed`, `cancelled` or `interrupted`.
**Note:** The following methods are useful specifically to resume a
`cancelled` item when session is restarted.

View file

@ -27,12 +27,12 @@ processes:
// In main process.
const {ipcMain} = require('electron')
ipcMain.on('asynchronous-message', (event, arg) => {
console.log(arg) // prints "ping"
console.log(arg) // prints "ping"
event.sender.send('asynchronous-reply', 'pong')
})
ipcMain.on('synchronous-message', (event, arg) => {
console.log(arg) // prints "ping"
console.log(arg) // prints "ping"
event.returnValue = 'pong'
})
```

View file

@ -7,7 +7,7 @@ Process: [Renderer](../glossary.md#renderer-process)
The `ipcRenderer` module is an instance of the
[EventEmitter](https://nodejs.org/api/events.html#events_class_eventemitter) class. It provides a few
methods so you can send synchronous and asynchronous messages from the render
process (web page) to the main process. You can also receive replies from the
process (web page) to the main process. You can also receive replies from the
main process.
See [ipcMain](ipc-main.md) for code examples.

View file

@ -165,21 +165,21 @@ Creates a new `NativeImage` instance from `dataURL`.
Returns `NativeImage`
Creates a new `NativeImage` instance from the NSImage that maps to the
given image name. See [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename?language=objc)
given image name. See [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename?language=objc)
for a list of possible values.
The `hslShift` is applied to the image with the following rules
* `hsl_shift[0]` (hue): The absolute hue value for the image - 0 and 1 map
to 0 and 360 on the hue color wheel (red).
* `hsl_shift[1]` (saturation): A saturation shift for the image, with the
following key values:
0 = remove all color.
0.5 = leave unchanged.
1 = fully saturate the image.
following key values:
0 = remove all color.
0.5 = leave unchanged.
1 = fully saturate the image.
* `hsl_shift[2]` (lightness): A lightness shift for the image, with the
following key values:
0 = remove all lightness (make all pixels black).
0.5 = leave unchanged.
following key values:
0 = remove all lightness (make all pixels black).
0.5 = leave unchanged.
1 = full lightness (make all pixels white).
This means that `[-1, 0, 1]` will make the image completely white and
@ -245,7 +245,7 @@ image instead of a copy, so you _must_ ensure that the associated
#### `image.isEmpty()`
Returns `Boolean` - Whether the image is empty.
Returns `Boolean` - Whether the image is empty.
#### `image.getSize()`

View file

@ -38,7 +38,7 @@ Returns `Boolean` - Whether or not desktop notifications are supported on the cu
* `hasReply` Boolean (optional) _macOS_ - Whether or not to add an inline reply option to the notification.
* `replyPlaceholder` String (optional) _macOS_ - The placeholder to write in the inline reply input field.
* `sound` String (optional) _macOS_ - The name of the sound file to play when the notification is shown.
* `actions` [NotificationAction[]](structures/notification-action.md) (optional) _macOS_ - Actions to add to the notification. Please read the available actions and limitations in the `NotificationAction` documentation.
* `actions` [NotificationAction[]](structures/notification-action.md) (optional) _macOS_ - Actions to add to the notification. Please read the available actions and limitations in the `NotificationAction` documentation.
### Instance Events

View file

@ -23,10 +23,10 @@ The `powerSaveBlocker` module has the following methods:
* `type` String - Power save blocker type.
* `prevent-app-suspension` - Prevent the application from being suspended.
Keeps system active but allows screen to be turned off. Example use cases:
Keeps system active but allows screen to be turned off. Example use cases:
downloading a file or playing audio.
* `prevent-display-sleep` - Prevent the display from going to sleep. Keeps
system and screen active. Example use case: playing video.
system and screen active. Example use case: playing video.
Returns `Integer` - The blocker ID that is assigned to this power blocker.

View file

@ -47,8 +47,8 @@ will disable the support for `asar` archives in Node's built-in modules.
### `process.noDeprecation`
A `Boolean` that controls whether or not deprecation warnings are printed to `stderr`.
Setting this to `true` will silence deprecation warnings. This property is used
A `Boolean` that controls whether or not deprecation warnings are printed to `stderr`.
Setting this to `true` will silence deprecation warnings. This property is used
instead of the `--no-deprecation` command line flag.
### `process.resourcesPath`
@ -58,20 +58,20 @@ A `String` representing the path to the resources directory.
### `process.throwDeprecation`
A `Boolean` that controls whether or not deprecation warnings will be thrown as
exceptions. Setting this to `true` will throw errors for deprecations. This
exceptions. Setting this to `true` will throw errors for deprecations. This
property is used instead of the `--throw-deprecation` command line flag.
### `process.traceDeprecation`
A `Boolean` that controls whether or not deprecations printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for deprecations.
This property is instead of the `--trace-deprecation` command line flag.
their stack trace. Setting this to `true` will print stack traces for deprecations.
This property is instead of the `--trace-deprecation` command line flag.
### `process.traceProcessWarnings`
A `Boolean` that controls whether or not process warnings printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for process warnings
(including deprecations). This property is instead of the `--trace-warnings` command
line flag.
their stack trace. Setting this to `true` will print stack traces for process warnings
(including deprecations). This property is instead of the `--trace-warnings` command
line flag.
### `process.type`

View file

@ -222,7 +222,7 @@ const {protocol} = require('electron')
const {PassThrough} = require('stream')
function createStream (text) {
const rv = new PassThrough() // PassThrough is also a Readable stream
const rv = new PassThrough() // PassThrough is also a Readable stream
rv.push(text)
rv.push(null)
return rv

View file

@ -160,7 +160,7 @@ For example:
over to the SOCKS5 proxy `bar.com` if `foopy` is unavailable.
* `http=foopy,direct://` - Use HTTP proxy `foopy` for http URLs, and use no
proxy if `foopy` is unavailable.
* `http=foopy;socks=foopy2` - Use HTTP proxy `foopy` for http URLs, and use
* `http=foopy;socks=foopy2` - Use HTTP proxy `foopy` for http URLs, and use
`socks4://foopy2` for all other URLs.
The `proxyBypassRules` is a comma separated list of rules described below:

View file

@ -116,13 +116,13 @@ Returns `any` - The value of `key` in `NSUserDefaults`.
Some popular `key` and `type`s are:
* `AppleInterfaceStyle`: `string`
* `AppleAquaColorVariant`: `integer`
* `AppleHighlightColor`: `string`
* `AppleShowScrollBars`: `string`
* `NSNavRecentPlaces`: `array`
* `NSPreferredWebServices`: `dictionary`
* `NSUserDictionaryReplacementItems`: `array`
* `AppleInterfaceStyle`: `string`
* `AppleAquaColorVariant`: `integer`
* `AppleHighlightColor`: `string`
* `AppleShowScrollBars`: `string`
* `NSNavRecentPlaces`: `array`
* `NSPreferredWebServices`: `dictionary`
* `NSUserDictionaryReplacementItems`: `array`
### `systemPreferences.setUserDefault(key, type, value)` _macOS_
@ -137,7 +137,7 @@ if they don't.
Some popular `key` and `type`s are:
* `ApplePressAndHoldEnabled`: `boolean`
* `ApplePressAndHoldEnabled`: `boolean`
### `systemPreferences.removeUserDefault(key)` _macOS_

View file

@ -30,7 +30,7 @@ updates the control in the touch bar. Updating deep properties inside this array
#### `touchBarScrubber.selectedStyle`
A `String` representing the style that selected items in the scrubber should have. Updating this value immediately
updates the control in the touch bar. Possible values:
updates the control in the touch bar. Possible values:
* `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`.
* `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`.
@ -40,7 +40,7 @@ updates the control in the touch bar. Possible values:
A `String` representing the style that selected items in the scrubber should have. This style is overlayed on top
of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
touch bar. Possible values:
touch bar. Possible values:
* `background` - Maps to `[NSScrubberSelectionStyle roundedBackgroundStyle]`.
* `outline` - Maps to `[NSScrubberSelectionStyle outlineOverlayStyle]`.
@ -49,7 +49,7 @@ touch bar. Possible values:
#### `touchBarScrubber.showArrowButtons`
A `Boolean` representing whether to show the left / right selection arrows in this scrubber. Updating this value
immediately updates the control in the touch bar.
immediately updates the control in the touch bar.
#### `touchBarScrubber.mode`

View file

@ -26,7 +26,7 @@ Process: [Main](../tutorial/quick-start.md#main-process)
* `multiple` - Multiple items can be selected at a time.
* `buttons` - Make the segments act as buttons, each segment can be pressed and released but never marked as active.
* `segments` [SegmentedControlSegment[]](structures/segmented-control-segment.md) - An array of segments to place in this control.
* `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.
* `selectedIndex` Integer (optional) - The index of the currently selected segment, will update automatically with user interaction. When the mode is multiple it will be the last selected item.
* `change` Function - Called when the user selects a new segment.
* `selectedIndex` Integer - The index of the segment the user selected.
* `isSelected` Boolean - Whether as a result of user selection the segment is selected or not.
@ -42,10 +42,10 @@ in the touch bar.
#### `touchBarSegmentedControl.segments`
A `SegmentedControlSegment[]` array representing the segments in this control. Updating this value immediately
A `SegmentedControlSegment[]` array representing the segments in this control. Updating this value immediately
updates the control in the touch bar. Updating deep properties inside this array **does not update the touch bar**.
#### `touchBarSegmentedControl.selectedIndex`
An `Integer` representing the currently selected segment. Changing this value immediately updates the control
An `Integer` representing the currently selected segment. Changing this value immediately updates the control
in the touch bar. User interaction with the touch bar will update this value automatically.

View file

@ -511,7 +511,7 @@ Returns:
Emitted when bluetooth device needs to be selected on call to
`navigator.bluetooth.requestDevice`. To use `navigator.bluetooth` api
`webBluetooth` should be enabled. If `event.preventDefault` is not called,
`webBluetooth` should be enabled. If `event.preventDefault` is not called,
first available device will be selected. `callback` should be called with
`deviceId` to be selected, passing empty string to `callback` will
cancel the request.
@ -762,7 +762,7 @@ invoked by a gesture from the user. Setting `userGesture` to `true` will remove
this limitation.
If the result of the executed code is a promise the callback result will be the
resolved value of the promise. We recommend that you use the returned Promise
resolved value of the promise. We recommend that you use the returned Promise
to handle code that results in a Promise.
```js
@ -1144,7 +1144,7 @@ app.on('ready', () => {
<body>
<script>
require('electron').ipcRenderer.on('ping', (event, message) => {
console.log(message) // Prints 'whoooooooh!'
console.log(message) // Prints 'whoooooooh!'
})
</script>
</body>
@ -1334,17 +1334,17 @@ Returns `String` - Returns the WebRTC IP Handling Policy.
#### `contents.setWebRTCIPHandlingPolicy(policy)`
* `policy` String - Specify the WebRTC IP Handling Policy.
* `default` - Exposes user's public and local IPs. This is the default
behavior. When this policy is used, WebRTC has the right to enumerate all
* `default` - Exposes user's public and local IPs. This is the default
behavior. When this policy is used, WebRTC has the right to enumerate all
interfaces and bind them to discover public interfaces.
* `default_public_interface_only` - Exposes user's public IP, but does not
expose user's local IP. When this policy is used, WebRTC should only use the
expose user's local IP. When this policy is used, WebRTC should only use the
default route used by http. This doesn't expose any local addresses.
* `default_public_and_private_interfaces` - Exposes user's public and local
IPs. When this policy is used, WebRTC should only use the default route used
IPs. When this policy is used, WebRTC should only use the default route used
by http. This also exposes the associated default private address. Default
route is the route chosen by the OS on a multi-homed endpoint.
* `disable_non_proxied_udp` - Does not expose public or local IPs. When this
* `disable_non_proxied_udp` - Does not expose public or local IPs. When this
policy is used, WebRTC should only use TCP to contact peers or servers unless
the proxy server supports UDP.

View file

@ -8,7 +8,7 @@ installation errors.
In almost all cases, these errors are the result of network problems and not
actual issues with the `electron` npm package. Errors like `ELIFECYCLE`,
`EAI_AGAIN`, `ECONNRESET`, and `ETIMEDOUT` are all indications of such
network problems. The best resolution is to try switching networks, or
network problems. The best resolution is to try switching networks, or
just wait a bit and try installing again.
You can also attempt to download Electron directly from

View file

@ -12,15 +12,15 @@ The ASAR format was created primarily to improve performance on Windows... TODO
### Brightray
Brightray [was](https://github.com/electron-archive/brightray) a static library
that made [libchromiumcontent] easier to use in applications. It is now
Brightray [was](https://github.com/electron-archive/brightray) a static library
that made [libchromiumcontent] easier to use in applications. It is now
deprecated and has been merged into Electron's codebase.
### CRT
The C Run-time Library (CRT) is the part of the C++ Standard Library that
incorporates the ISO C99 standard library. The Visual C++ libraries that
implement the CRT support native code development, and both mixed native and
The C Run-time Library (CRT) is the part of the C++ Standard Library that
incorporates the ISO C99 standard library. The Visual C++ libraries that
implement the CRT support native code development, and both mixed native and
managed code, and pure managed code for .NET development.
### DMG
@ -31,8 +31,8 @@ supports `dmg` as a build target.
### IME
Input Method Editor. A program that allows users to enter characters and
symbols not found on their keyboard. For example, this allows users of Latin
Input Method Editor. A program that allows users to enter characters and
symbols not found on their keyboard. For example, this allows users of Latin
keyboards to input Chinese, Japanese, Korean and Indic characters.
### IPC
@ -51,7 +51,7 @@ dependencies (e.g., Blink, [V8], etc.). Also referred to as "libcc".
The main process, commonly a file named `main.js`, is the entry point to every
Electron app. It controls the life of the app, from open to close. It also
manages native elements such as the Menu, Menu Bar, Dock, Tray, etc. The
manages native elements such as the Menu, Menu Bar, Dock, Tray, etc. The
main process is responsible for creating each new renderer process in the app.
The full Node API is built in.
@ -93,8 +93,8 @@ as a build target.
### OSR
OSR (Off-screen rendering) can be used for loading heavy page in
background and then displaying it after (it will be much faster).
OSR (Off-screen rendering) can be used for loading heavy page in
background and then displaying it after (it will be much faster).
It allows you to render page without showing it on screen.
### process
@ -149,10 +149,10 @@ available in "core".
V8 is Google's open source JavaScript engine. It is written in C++ and is
used in Google Chrome. V8 can run standalone, or can be embedded into any C++ application.
Electron builds V8 as part of Chromium and then points Node to that V8 when
Electron builds V8 as part of Chromium and then points Node to that V8 when
building it.
V8's version numbers always correspond to those of Google Chrome. Chrome 59
V8's version numbers always correspond to those of Google Chrome. Chrome 59
includes V8 5.9, Chrome 58 includes V8 5.8, etc.
- [developers.google.com/v8](https://developers.google.com/v8)