feat: deprecate ipcRenderer.sendTo() (#39091)

* feat: deprecate ipcRenderer.sendTo()

* docs: add _Deprecated_ to ipcRenderer.sendTo()
This commit is contained in:
Milan Burda 2023-07-21 11:16:44 +02:00 committed by GitHub
parent 3a5e2dd90c
commit ada8eb33b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 2 deletions

View file

@ -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);
};