diff --git a/docs/api/app.md b/docs/api/app.md index c41fa71704..00cf2eb952 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -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_ diff --git a/docs/api/crash-reporter.md b/docs/api/crash-reporter.md index 1b727df7b9..cfa133fbc3 100644 --- a/docs/api/crash-reporter.md +++ b/docs/api/crash-reporter.md @@ -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. diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 456243cccb..cf4e9e17f0 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -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. diff --git a/docs/api/download-item.md b/docs/api/download-item.md index 0c524fae39..9a9cfc6a4a 100644 --- a/docs/api/download-item.md +++ b/docs/api/download-item.md @@ -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. diff --git a/docs/api/ipc-main.md b/docs/api/ipc-main.md index a9afa409a0..e09c9a99bf 100644 --- a/docs/api/ipc-main.md +++ b/docs/api/ipc-main.md @@ -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' }) ``` diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index c10540c71c..abb00f99da 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -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. diff --git a/docs/api/native-image.md b/docs/api/native-image.md index 1c810fa69b..f1d9e5ce28 100644 --- a/docs/api/native-image.md +++ b/docs/api/native-image.md @@ -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()` diff --git a/docs/api/notification.md b/docs/api/notification.md index aa44f546c5..9d8f15853e 100644 --- a/docs/api/notification.md +++ b/docs/api/notification.md @@ -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 diff --git a/docs/api/power-save-blocker.md b/docs/api/power-save-blocker.md index 2ad968a73b..ea9a81f3f5 100644 --- a/docs/api/power-save-blocker.md +++ b/docs/api/power-save-blocker.md @@ -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. diff --git a/docs/api/process.md b/docs/api/process.md index f59e2614a3..f183f72c52 100644 --- a/docs/api/process.md +++ b/docs/api/process.md @@ -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` diff --git a/docs/api/protocol.md b/docs/api/protocol.md index bf4f8f6455..4e14a5f8ca 100644 --- a/docs/api/protocol.md +++ b/docs/api/protocol.md @@ -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 diff --git a/docs/api/session.md b/docs/api/session.md index dc80c14077..f75b6399f1 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -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: diff --git a/docs/api/system-preferences.md b/docs/api/system-preferences.md index b5f21049cc..1fe53eed36 100644 --- a/docs/api/system-preferences.md +++ b/docs/api/system-preferences.md @@ -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_ diff --git a/docs/api/touch-bar-scrubber.md b/docs/api/touch-bar-scrubber.md index 17519e0527..6ed6aee188 100644 --- a/docs/api/touch-bar-scrubber.md +++ b/docs/api/touch-bar-scrubber.md @@ -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` diff --git a/docs/api/touch-bar-segmented-control.md b/docs/api/touch-bar-segmented-control.md index c4fce9053a..b9e50e9d32 100644 --- a/docs/api/touch-bar-segmented-control.md +++ b/docs/api/touch-bar-segmented-control.md @@ -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. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 64110c1515..b2121e1239 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -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', () => {
@@ -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. diff --git a/docs/faq.md b/docs/faq.md index 947f9fc2a3..210f313ef3 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -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 diff --git a/docs/glossary.md b/docs/glossary.md index ee6e07883e..15be00d119 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -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)