Skip to content

Commit

Permalink
docs: fix typos (electron#24982)
Browse files Browse the repository at this point in the history
* docs: sync table of content from pull-requests.md to CONTRIBUTING.md

This also fixes some incorrect / dead links.

* docs: fix a bunch of typos
  • Loading branch information
GitHubPang authored Aug 18, 2020
1 parent b55e8dc commit 5c5e006
Show file tree
Hide file tree
Showing 15 changed files with 30 additions and 30 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ dependencies, and tools contained in the `electron/electron` repository.
* [Step 1: Fork](https://electronjs.org/docs/development/pull-requests#step-1-fork)
* [Step 2: Build](https://electronjs.org/docs/development/pull-requests#step-2-build)
* [Step 3: Branch](https://electronjs.org/docs/development/pull-requests#step-3-branch)
* [The Process of Making Changes](https://electronjs.org/docs/development/pull-requests#the-process-of-making-changes)
* [Making Changes](https://electronjs.org/docs/development/pull-requests#making-changes)
* [Step 4: Code](https://electronjs.org/docs/development/pull-requests#step-4-code)
* [Step 5: Commit](https://electronjs.org/docs/development/pull-requests#step-5-commit)
* [Commit message guidelines](https://electronjs.org/docs/development/pull-requests#commit-message-guidelines)
* [Step 6: Rebase](https://electronjs.org/docs/development/pull-requests#step-6-rebase)
* [Step 7: Test](https://electronjs.org/docs/development/pull-requests#step-7-test)
* [Step 8: Push](https://electronjs.org/docs/development/pull-requests#step-8-push)
* [Step 8: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-8-opening-the-pull-request)
* [Step 9: Discuss and Update](#step-9-discuss-and-update)
* [Step 9: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-9-opening-the-pull-request)
* [Step 10: Discuss and Update](https://electronjs.org/docs/development/pull-requests#step-10-discuss-and-update)
* [Approval and Request Changes Workflow](https://electronjs.org/docs/development/pull-requests#approval-and-request-changes-workflow)
* [Step 10: Landing](https://electronjs.org/docs/development/pull-requests#step-10-landing)
* [Step 11: Landing](https://electronjs.org/docs/development/pull-requests#step-11-landing)
* [Continuous Integration Testing](https://electronjs.org/docs/development/pull-requests#continuous-integration-testing)

## Style Guides
Expand Down
12 changes: 6 additions & 6 deletions docs/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ Returns:
Emitted when the GPU process crashes or is killed.

**Deprecated:** This event is superceded by the `child-process-gone` event
which contains more information about why the child process dissapeared. It
which contains more information about why the child process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.

Expand All @@ -385,7 +385,7 @@ Returns:
Emitted when the renderer process of `webContents` crashes or is killed.

**Deprecated:** This event is superceded by the `render-process-gone` event
which contains more information about why the render process dissapeared. It
which contains more information about why the render process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.

Expand All @@ -405,7 +405,7 @@ Returns:
* `launch-failure` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed

Emitted when the renderer process unexpectedly dissapears. This is normally
Emitted when the renderer process unexpectedly disappears. This is normally
because it was crashed or killed.

#### Event: 'child-process-gone'
Expand Down Expand Up @@ -435,7 +435,7 @@ Returns:
* `name` String (optional) - The name of the process. i.e. for plugins it might be Flash.
Examples for utility: `Audio Service`, `Content Decryption Module Service`, `Network Service`, `Video Capture`, etc.

Emitted when the child process unexpectedly dissapears. This is normally
Emitted when the child process unexpectedly disappears. This is normally
because it was crashed or killed. It does not include renderer processes.

### Event: 'accessibility-support-changed' _macOS_ _Windows_
Expand Down Expand Up @@ -1222,7 +1222,7 @@ Returns `Object`:
* `path` String _Windows_ - The executable to an app that corresponds to a registry entry.
* `args` String[] _Windows_ - the command-line arguments to pass to the executable.
* `scope` String _Windows_ - one of `user` or `machine`. Indicates whether the registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`.
* `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therfore shows as `enabled` in Task Manager and Windows settings.
* `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therefore shows as `enabled` in Task Manager and Windows settings.

### `app.setLoginItemSettings(settings)` _macOS_ _Windows_

Expand Down Expand Up @@ -1356,7 +1356,7 @@ 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.

By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.

For example:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/crash-reporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ your crash reporting backend you should stitch together keys in this format.

* `key` String - Parameter key, must be no longer than 39 bytes.

Remove a extra parameter from the current set of parameters. Future crashes
Remove an extra parameter from the current set of parameters. Future crashes
will not include this parameter.

### `crashReporter.getParameters()`
Expand Down
2 changes: 1 addition & 1 deletion docs/api/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ Shows a message box, it will block the process until the message box is closed.
It returns the index of the clicked button.

The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
If `browserWindow` is not shown dialog will not be attached to it. In such case It will be displayed as independed window.
If `browserWindow` is not shown dialog will not be attached to it. In such case it will be displayed as an independent window.

### `dialog.showMessageBox([browserWindow, ]options)`

Expand Down
2 changes: 1 addition & 1 deletion docs/api/modernization/overview.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Modernization

The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise intiative can be tracked in the [promisification](promisification.md) tracking file.
The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise initiative can be tracked in the [promisification](promisification.md) tracking file.

As we work to perform these updates, we seek to create the least disruptive amount of change at any given time, so as many changes as possible will be introduced in a backward compatible manner and deprecated after enough time has passed to give users a chance to upgrade their API calls.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/native-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Your application should then always use `shouldUseDarkColors` to determine what
### `nativeTheme.shouldUseHighContrastColors` _macOS_ _Windows_ _Readonly_

A `Boolean` for if the OS / Chromium currently has high-contrast mode enabled
or is being instructed to show a high-constrast UI.
or is being instructed to show a high-contrast UI.

### `nativeTheme.shouldUseInvertedColorScheme` _macOS_ _Windows_ _Readonly_

Expand Down
4 changes: 2 additions & 2 deletions docs/api/session.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
* `permission` String - Enum of 'media'.
* `requestingOrigin` String - The origin URL of the permission check
* `details` Object - Some properties are only available on certain permission types.
* `securityOrigin` String - The security orign of the `media` check.
* `securityOrigin` String - The security origin of the `media` check.
* `mediaType` String - The type of media access being requested, can be `video`,
`audio` or `unknown`
* `requestingUrl` String - The last URL the requesting frame loaded
Expand Down Expand Up @@ -526,7 +526,7 @@ Returns `String[]` - An array of language codes the spellchecker is enabled for.
will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this
setting with the current OS locale. This setting is persisted across restarts.

**Note:** On macOS the OS spellchecker is used and has it's own list of languages. This API is a no-op on macOS.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS.

#### `ses.setSpellCheckerDictionaryDownloadURL(url)`

Expand Down
2 changes: 1 addition & 1 deletion docs/api/shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Show the given file in a file manager. If possible, select the file.

* `path` String

Returns `Promise<String>` - Resolves with an string containing the error message corresponding to the failure if a failure occurred, otherwise "".
Returns `Promise<String>` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "".

Open the given file in the desktop's default manner.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/structures/desktop-capturer-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
available.
* `appIcon` [NativeImage](../native-image.md) - An icon image of the
application that owns the window or null if the source has a type screen.
The size of the icon is not known in advance and depends on what the
The size of the icon is not known in advance and depends on what
the application provides.
2 changes: 1 addition & 1 deletion docs/api/structures/printer-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* `isDefault` Boolean - whether or not a given printer is set as the default printer on the OS.
* `options` Object - an object containing a variable number of platform-specific printer information.

The number represented by `status` means different things on different platforms: on Windows it's potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html).
The number represented by `status` means different things on different platforms: on Windows its potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html).

## Example

Expand Down
2 changes: 1 addition & 1 deletion docs/api/system-preferences.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ systemPreferences.promptTouchID('To get consent for a Security-Gated Thing').the
})
```

This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on the their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves.
This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves.

**NOTE:** This API will return a rejected Promise on macOS systems older than Sierra 10.12.2.

Expand Down
12 changes: 6 additions & 6 deletions docs/api/web-contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ Returns:
Emitted after a server side redirect occurs during navigation. For example a 302
redirect.

This event can not be prevented, if you want to prevent redirects you should
This event cannot be prevented, if you want to prevent redirects you should
checkout out the `will-redirect` event above.

#### Event: 'did-navigate'
Expand Down Expand Up @@ -348,7 +348,7 @@ Returns:
Emitted when the renderer process crashes or is killed.

**Deprecated:** This event is superceded by the `render-process-gone` event
which contains more information about why the render process dissapeared. It
which contains more information about why the render process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.

Expand All @@ -367,7 +367,7 @@ Returns:
* `launch-failure` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed

Emitted when the renderer process unexpectedly dissapears. This is normally
Emitted when the renderer process unexpectedly disappears. This is normally
because it was crashed or killed.

#### Event: 'unresponsive'
Expand Down Expand Up @@ -720,7 +720,7 @@ This event can be used to configure `webPreferences` for the `webContents`
of a `<webview>` before it's loaded, and provides the ability to set settings
that can't be set via `<webview>` attributes.

**Note:** The specified `preload` script option will be appear as `preloadURL`
**Note:** The specified `preload` script option will appear as `preloadURL`
(not `preload`) in the `webPreferences` object emitted with this event.

#### Event: 'did-attach-webview'
Expand Down Expand Up @@ -1255,7 +1255,7 @@ is large then 0.

#### `contents.incrementCapturerCount([size, stayHidden])`

* `size` [Size](structures/size.md) (optional) - The perferred size for the capturer.
* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer.
* `stayHidden` Boolean (optional) - Keep the page hidden instead of visible.

Increase the capturer count by one. The page is considered visible when its browser window is
Expand Down Expand Up @@ -1311,7 +1311,7 @@ Returns [`PrinterInfo[]`](structures/printer-info.md)
* `success` Boolean - Indicates success of the print call.
* `failureReason` String - Error description called back if the print fails.

When a custom `pageSize` is passed, Chromium attempts to validate platform specific minumum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems.
When a custom `pageSize` is passed, Chromium attempts to validate platform specific minimum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems.

Prints window's web page. When `silent` is set to `true`, Electron will pick
the system's default printer if `deviceName` is empty and the default settings for printing.
Expand Down
2 changes: 1 addition & 1 deletion docs/development/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Try not to be discouraged. If you feel that a review is unfair, say so or seek
the input of another project contributor. Often such comments are the result of
a reviewer having taken insufficient time to review and are not ill-intended.
Such difficulties can often be resolved with a bit of patience. That said,
reviewers should be expected to provide helpful feeback.
reviewers should be expected to provide helpful feedback.

### Step 11: Landing

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/mojave-dark-mode-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ to automate the `Info.plist` changes during app build time.
anything where the UI comes from macOS and not your app. As of Electron 7.0.0, the default behavior
is to opt into this automatic theming from the OS. If you wish to opt-out and are using Electron
&gt; 8.0.0, you must set the `NSRequiresAquaSystemAppearance` key in the `Info.plist` file to `true`.
Please note that Electron 8.0.0 and above will not let your opt-out of this theming, due to the use
Please note that Electron 8.0.0 and above will not let you opt-out of this theming, due to the use
of the macOS 10.14 SDK.

## Automatically updating your own interfaces
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/windows-arm.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if (process.arch === 'x64') {
If you want to target arm64, logic like this will typically select the wrong architecture, so carefully check your application and build scripts for conditions like this. In custom build and packaging scripts, you should always check the value of `npm_config_arch` in the environment, rather than relying on the current process arch.

### Native modules
If you use native modules, you must make sure that that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or or `.lib` files provided or referenced by the native module are available for Windows on Arm.
If you use native modules, you must make sure that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or `.lib` files provided or referenced by the native module are available for Windows on Arm.

### Testing your app
To test your app, use a Windows on Arm device running Windows 10 (version 1903 or later). Make sure that you copy your application over to the target device - Chromium's sandbox will not work correctly when loading your application assets from a network location.
Expand Down Expand Up @@ -84,7 +84,7 @@ After completing all of the above, open your cross-compilation command prompt an

Debugging native modules can be done with Visual Studio 2017 (running on your development machine) and corresponding [Visual Studio Remote Debugger](https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-cpp?view=vs-2019) running on the target device. To debug:

1. Lanch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded).
1. Launch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded).
2. Launch Visual Studio 2017 on your development machine.
3. Connect to the target device by selecting _Debug > Attach to Process..._ and enter the device's IP address and the port number displayed by the Visual Studio Remote Debugger tool.
4. Click _Refresh_ and select the [appropriate Electron process to attach](../development/debug-instructions-windows.md).
Expand Down

0 comments on commit 5c5e006

Please sign in to comment.