feat: deprecate ipcRenderer.sendTo()
(#39091)
* feat: deprecate ipcRenderer.sendTo() * docs: add _Deprecated_ to ipcRenderer.sendTo()
This commit is contained in:
parent
3a5e2dd90c
commit
ada8eb33b2
5 changed files with 11 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
import { EventEmitter } from 'events';
|
||||
import * as deprecate from '@electron/internal/common/deprecate';
|
||||
|
||||
const { ipc } = process._linkedBinding('electron_renderer_ipc');
|
||||
|
||||
|
@ -18,6 +19,7 @@ ipcRenderer.sendToHost = function (channel, ...args) {
|
|||
};
|
||||
|
||||
ipcRenderer.sendTo = function (webContentsId, channel, ...args) {
|
||||
deprecate.warnOnce('ipcRenderer.sendTo');
|
||||
return ipc.sendTo(webContentsId, channel, args);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue