docs: add missing ipcRenderer.off()
/ ipcRenderer.addListener()
aliases (#39816)
* docs: add missing `ipcRenderer.off()` / `ipcRenderer.addListener()` aliases * Update docs/api/ipc-renderer.md Co-authored-by: David Sanders <dsanders11@ucsbalum.com> * fix ipcRenderer.removeListener * update ts-smoke --------- Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
This commit is contained in:
parent
d7e4bb6608
commit
9c7086074e
4 changed files with 39 additions and 8 deletions
|
@ -32,6 +32,15 @@ The `ipcRenderer` module has the following method to listen for events and send
|
|||
Listens to `channel`, when a new message arrives `listener` would be called with
|
||||
`listener(event, args...)`.
|
||||
|
||||
### `ipcRenderer.off(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Alias for [`ipcRenderer.removeListener`](#ipcrendererremovelistenerchannel-listener).
|
||||
|
||||
### `ipcRenderer.once(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
|
@ -42,10 +51,20 @@ 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.
|
||||
|
||||
### `ipcRenderer.addListener(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Alias for [`ipcRenderer.on`](#ipcrendereronchannel-listener).
|
||||
|
||||
### `ipcRenderer.removeListener(channel, listener)`
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Removes the specified `listener` from the listener array for the specified
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue