mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
chore: remove deprecated ipcRenderer.sendTo() (#39087)
chore: remove deprecated ipcRenderer.sendTo()
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user