chore: remove deprecated ipcRenderer.sendTo() (#39087)

chore: remove deprecated ipcRenderer.sendTo()
This commit is contained in:
Milan Burda 2023-08-28 16:29:27 +02:00 committed by GitHub
parent b5997a012d
commit 5078cae861
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 20 additions and 207 deletions

View file

@ -1,5 +1,4 @@
import { EventEmitter } from 'events';
import * as deprecate from '@electron/internal/common/deprecate';
const { ipc } = process._linkedBinding('electron_renderer_ipc');
@ -18,12 +17,6 @@ ipcRenderer.sendToHost = function (channel, ...args) {
return ipc.sendToHost(channel, args);
};
const sendToDeprecated = deprecate.warnOnce('ipcRenderer.sendTo');
ipcRenderer.sendTo = function (webContentsId, channel, ...args) {
sendToDeprecated();
return ipc.sendTo(webContentsId, channel, args);
};
ipcRenderer.invoke = async function (channel, ...args) {
const { error, result } = await ipc.invoke(internal, channel, args);
if (error) {