Skip to content

Commit

Permalink
Merge pull request electron#11282 from Toinane/fix-documentation
Browse files Browse the repository at this point in the history
typographical revision in Documentation
  • Loading branch information
ckerr authored Dec 3, 2017
2 parents 851642f + 3d4ef66 commit 6beaafc
Show file tree
Hide file tree
Showing 39 changed files with 317 additions and 317 deletions.
20 changes: 10 additions & 10 deletions docs/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,15 +377,15 @@ 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.

### `app.relaunch([options])`

* `options` Object (optional)
* `args` String[] - (optional)
* `args` String[] (optional)
* `execPath` String (optional)

Relaunches the app when current instance exits.
Expand Down Expand Up @@ -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)`

Expand Down Expand Up @@ -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()`

Expand Down Expand Up @@ -998,21 +998,21 @@ 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
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_
Expand Down
2 changes: 1 addition & 1 deletion docs/api/auto-updater.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ The `autoUpdater` object has the following methods:
### `autoUpdater.setFeedURL(url[, requestHeaders])`

* `url` String
* `requestHeaders` Object _macOS_ (optional) - HTTP request headers.
* `requestHeaders` Object (optional) _macOS_ - HTTP request headers.

Sets the `url` and initialize the auto updater.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/browser-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ removed in future Electron releases.
Process: [Main](../glossary.md#main-process)

A `BrowserView` can be used to embed additional web content into a
`BrowserWindow`. It is like a child window, except that it is positioned
[`BrowserWindow`](browser-window.md). It is like a child window, except that it is positioned
relative to its owning window. It is meant to be an alternative to the
`webview` tag.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/browser-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ Same as `webContents.capturePage([rect, ]callback)`.
* `httpReferrer` String (optional) - A HTTP Referrer url.
* `userAgent` String (optional) - A user agent originating the request.
* `extraHeaders` String (optional) - Extra headers separated by "\n"
* `postData` ([UploadRawData[]](structures/upload-raw-data.md) | [UploadFile[]](structures/upload-file.md) | [UploadFileSystem[]](structures/upload-file-system.md) | [UploadBlob[]](structures/upload-blob.md)) - (optional)
* `postData` ([UploadRawData[]](structures/upload-raw-data.md) | [UploadFile[]](structures/upload-file.md) | [UploadFileSystem[]](structures/upload-file-system.md) | [UploadBlob[]](structures/upload-blob.md)) (optional)
* `baseURLForDataURL` String (optional) - Base url (with trailing path separator) for files to be loaded by the data url. This is needed only if the specified `url` is a data url and needs to load other files.

Same as `webContents.loadURL(url[, options])`.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/client-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ specified, `partition` is ignored.
* `protocol` String (optional) - The protocol scheme in the form 'scheme:'.
Currently supported values are 'http:' or 'https:'. Defaults to 'http:'.
* `host` String (optional) - The server host provided as a concatenation of
the hostname and the port number 'hostname:port'
the hostname and the port number 'hostname:port'.
* `hostname` String (optional) - The server host name.
* `port` Integer (optional) - The server's listening port number.
* `path` String (optional) - The path part of the request URL.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/cookies.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The following events are available on instances of `Cookies`:
#### Event: 'changed'

* `event` Event
* `cookie` [Cookie](structures/cookie.md) - The cookie that was changed
* `cookie` [Cookie](structures/cookie.md) - The cookie that was changed.
* `cause` String - The cause of the change with one of the following values:
* `explicit` - The cookie was changed directly by a consumer's action.
* `overwrite` - The cookie was automatically removed due to an insert
Expand All @@ -62,7 +62,7 @@ The following methods are available on instances of `Cookies`:
`url`. Empty implies retrieving cookies of all urls.
* `name` String (optional) - Filters cookies by name.
* `domain` String (optional) - Retrieves cookies whose domains match or are
subdomains of `domains`
subdomains of `domains`.
* `path` String (optional) - Retrieves cookies whose path matches `path`.
* `secure` Boolean (optional) - Filters cookies by their Secure property.
* `session` Boolean (optional) - Filters out session or persistent cookies.
Expand Down
8 changes: 4 additions & 4 deletions docs/api/crash-reporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ The `crashReporter` module has the following methods:
* `extra` Object (optional) - An object you can define that will be sent along with the
report. Only string properties are sent correctly. Nested objects are not
supported and the property names and values must be less than 64 characters long.
* `crashesDirectory` String (optional) - Directory to store the crashreports temporarily (only used when the crash reporter is started via `process.crashReporter.start`)
* `crashesDirectory` String (optional) - Directory to store the crashreports temporarily (only used when the crash reporter is started via `process.crashReporter.start`).

You are required to call this method before using any other `crashReporter` APIs
and in each process (main/renderer) from which you want to collect crash reports.
Expand Down Expand Up @@ -102,14 +102,14 @@ 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.

### `crashReporter.setUploadToServer(uploadToServer)` _Linux_ _macOS_

* `uploadToServer` Boolean _macOS_ - Whether reports should be submitted to the server
* `uploadToServer` Boolean _macOS_ - Whether reports should be submitted to the server.

This would normally be controlled by user preferences. This has no effect if
called before `start` is called.
Expand Down Expand Up @@ -142,7 +142,7 @@ a `multipart/form-data` `POST`:
* `ver` String - The version of Electron.
* `platform` String - e.g. 'win32'.
* `process_type` String - e.g. 'renderer'.
* `guid` String - e.g. '5e1286fc-da97-479e-918b-6bfb0c3d1c72'
* `guid` String - e.g. '5e1286fc-da97-479e-918b-6bfb0c3d1c72'.
* `_version` String - The version in `package.json`.
* `_productName` String - The product name in the `crashReporter` `options`
object.
Expand Down
38 changes: 19 additions & 19 deletions docs/api/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The `dialog` module has the following methods:

### `dialog.showOpenDialog([browserWindow, ]options[, callback])`

* `browserWindow` BrowserWindow (optional)
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
* `options` Object
* `title` String (optional)
* `defaultPath` String (optional)
Expand All @@ -38,16 +38,16 @@ The `dialog` module has the following methods:
* `openDirectory` - Allow directories to be selected.
* `multiSelections` - Allow multiple paths to be selected.
* `showHiddenFiles` - Show hidden files in dialog.
* `createDirectory` - Allow creating new directories from dialog. _macOS_
* `promptToCreate` - Prompt for creation if the file path entered
* `createDirectory` _macOS_ - Allow creating new directories from dialog.
* `promptToCreate` _Windows_ - Prompt for creation if the file path entered
in the dialog does not exist. This does not actually create the file at
the path but allows non-existent paths to be returned that should be
created by the application. _Windows_
* `noResolveAliases` - Disable the automatic alias (symlink) path
resolution. Selected aliases will now return the alias path instead of
their target path. _macOS_
* `treatPackageAsDirectory` - Treat packages, such as `.app` folders,
as a directory instead of a file. _macOS_
created by the application.
* `noResolveAliases` _macOS_ - Disable the automatic alias (symlink) path
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.
* `message` String (optional) _macOS_ - Message to display above input
boxes.
* `callback` Function (optional)
Expand Down Expand Up @@ -77,7 +77,7 @@ The `extensions` array should contain extensions without wildcards or dots (e.g.
`'*'` wildcard (no other wildcard is supported).

If a `callback` is passed, the API call will be asynchronous and the result
will be passed via `callback(filenames)`
will be passed via `callback(filenames)`.

**Note:** On Windows and Linux an open dialog can not be both a file selector
and a directory selector, so if you set `properties` to
Expand All @@ -86,7 +86,7 @@ shown.

### `dialog.showSaveDialog([browserWindow, ]options[, callback])`

* `browserWindow` BrowserWindow (optional)
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
* `options` Object
* `title` String (optional)
* `defaultPath` String (optional) - Absolute directory path, absolute file
Expand All @@ -111,11 +111,11 @@ The `filters` specifies an array of file types that can be displayed, see
`dialog.showOpenDialog` for an example.

If a `callback` is passed, the API call will be asynchronous and the result
will be passed via `callback(filename)`
will be passed via `callback(filename)`.

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

* `browserWindow` BrowserWindow (optional)
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
* `options` Object
* `type` String (optional) - Can be `"none"`, `"info"`, `"error"`, `"question"` or
`"warning"`. On Windows, `"question"` displays the same icon as `"info"`, unless
Expand Down Expand Up @@ -152,7 +152,7 @@ will be passed via `callback(filename)`
converted to `Vie_w` on Linux and `View` on macOS and can be selected
via `Alt-W` on Windows and Linux.
* `callback` Function (optional)
* `response` Number - The index of the button that was clicked
* `response` Number - The index of the button that was clicked.
* `checkboxChecked` Boolean - The checked state of the checkbox if
`checkboxLabel` was set. Otherwise `false`.

Expand All @@ -169,19 +169,19 @@ will be asynchronous and the result will be passed via `callback(response)`.

### `dialog.showErrorBox(title, content)`

* `title` String - The title to display in the error box
* `content` String - The text content to display in the error box
* `title` String - The title to display in the error box.
* `content` String - The text content to display in the error box.

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.

### `dialog.showCertificateTrustDialog([browserWindow, ]options, callback)` _macOS_ _Windows_

* `browserWindow` BrowserWindow (optional)
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
* `options` Object
* `certificate` [Certificate](structures/certificate.md) - The certificate to trust/import.
* `message` String - The message to display to the user.
Expand All @@ -202,7 +202,7 @@ On Windows the options are more limited, due to the Win32 APIs used:
## Sheets

On macOS, dialogs are presented as sheets attached to a window if you provide
a `BrowserWindow` reference in the `browserWindow` parameter, or modals if no
a [`BrowserWindow`](browser-window.md) reference in the `browserWindow` parameter, or modals if no
window is provided.

You can call `BrowserWindow.getCurrentWindow().setSheetOffset(offset)` to change
Expand Down
2 changes: 1 addition & 1 deletion docs/api/download-item.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/frameless-window.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ win.show()
the user's system).
* On Windows operating systems, transparent windows will not work when DWM is
disabled.
* On Linux users have to put `--enable-transparent-visuals --disable-gpu` in
* On Linux, users have to put `--enable-transparent-visuals --disable-gpu` in
the command line to disable GPU and allow ARGB to make transparent window,
this is caused by an upstream bug that [alpha channel doesn't work on some
NVidia drivers](https://code.google.com/p/chromium/issues/detail?id=369209) on
Linux.
* On Mac the native window shadow will not be shown on a transparent window.
* On Mac, the native window shadow will not be shown on a transparent window.

## Click-through window

Expand Down
4 changes: 2 additions & 2 deletions docs/api/ipc-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
})
```
Expand Down
8 changes: 4 additions & 4 deletions docs/api/ipc-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -55,7 +55,7 @@ Send a message to the main process asynchronously via `channel`, you can also
send arbitrary arguments. Arguments will be serialized in JSON internally and
hence no functions or prototype chain will be included.

The main process handles it by listening for `channel` with `ipcMain` module.
The main process handles it by listening for `channel` with [`ipcMain`](ipc-main.md) module.

### `ipcRenderer.sendSync(channel[, arg1][, arg2][, ...])`

Expand All @@ -68,7 +68,7 @@ Send a message to the main process synchronously via `channel`, you can also
send arbitrary arguments. Arguments will be serialized in JSON internally and
hence no functions or prototype chain will be included.

The main process handles it by listening for `channel` with `ipcMain` module,
The main process handles it by listening for `channel` with [`ipcMain`](ipc-main.md) module,
and replies by setting `event.returnValue`.

**Note:** Sending a synchronous message will block the whole renderer process,
Expand All @@ -80,7 +80,7 @@ unless you know what you are doing you should never use it.
* `channel` String
* `...args` any[]

Sends a message to a window with `windowid` via `channel`
Sends a message to a window with `windowid` via `channel`.

### `ipcRenderer.sendToHost(channel[, arg1][, arg2][, ...])`

Expand Down
Loading

0 comments on commit 6beaafc

Please sign in to comment.