Skip to content

Commit

Permalink
chore: update ref to docs (🤖)
Browse files Browse the repository at this point in the history
  • Loading branch information
1 parent e017ceb commit e8bf718
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/latest/.sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
72115c1948ebe8c31525654440dc4d35d0dbb6b9
14af0370d87257dc57410017fd505d2c285fe4c1
26 changes: 22 additions & 4 deletions docs/latest/api/ipc-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ process, see [webContents.send][web-contents-send] for more information.

## Methods

The `ipcMain` module has the following method to listen for events:
The `ipcMain` module has the following methods to listen for events:

### `ipcMain.on(channel, listener)`

Expand All @@ -44,6 +44,16 @@ The `ipcMain` module has the following method to listen for events:
Listens to `channel`, when a new message arrives `listener` would be called with
`listener(event, args...)`.

### `ipcMain.off(channel, listener)`

* `channel` string
* `listener` Function
* `event` [IpcMainEvent][ipc-main-event]
* `...args` any[]

Removes the specified `listener` from the listener array for the specified
`channel`.

### `ipcMain.once(channel, listener)`

* `channel` string
Expand All @@ -54,20 +64,28 @@ Listens to `channel`, when a new message arrives `listener` would be called with
Adds a one time `listener` function for the event. This `listener` is invoked
only the next time a message is sent to `channel`, after which it is removed.

### `ipcMain.addListener(channel, listener)`

* `channel` string
* `listener` Function
* `event` [IpcMainEvent][ipc-main-event]
* `...args` any[]

Alias for [`ipcMain.on`](#ipcmainonchannel-listener).

### `ipcMain.removeListener(channel, listener)`

* `channel` string
* `listener` Function
* `...args` any[]

Removes the specified `listener` from the listener array for the specified
`channel`.
Alias for [`ipcMain.off`](#ipcmainoffchannel-listener).

### `ipcMain.removeAllListeners([channel])`

* `channel` string (optional)

Removes listeners of the specified `channel`.
Removes all listeners from the specified `channel`. Removes all listeners from all channels if no channel is specified.

### `ipcMain.handle(channel, listener)`

Expand Down
12 changes: 6 additions & 6 deletions docs/latest/api/ipc-renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Listens to `channel`, when a new message arrives `listener` would be called with
* `event` [IpcRendererEvent][ipc-renderer-event]
* `...args` any[]

Alias for [`ipcRenderer.removeListener`](#ipcrendererremovelistenerchannel-listener).
Removes the specified `listener` from the listener array for the specified
`channel`.

### `ipcRenderer.once(channel, listener)`

Expand Down Expand Up @@ -74,14 +75,13 @@ Alias for [`ipcRenderer.on`](#ipcrendereronchannel-listener).
* `event` [IpcRendererEvent][ipc-renderer-event]
* `...args` any[]

Removes the specified `listener` from the listener array for the specified
`channel`.
Alias for [`ipcRenderer.off`](#ipcrendereroffchannel-listener).

### `ipcRenderer.removeAllListeners(channel)`
### `ipcRenderer.removeAllListeners([channel])`

* `channel` string
* `channel` string (optional)

Removes all listeners, or those of the specified `channel`.
Removes all listeners from the specified `channel`. Removes all listeners from all channels if no channel is specified.

### `ipcRenderer.send(channel, ...args)`

Expand Down

0 comments on commit e8bf718

Please sign in to comment.