mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
feat: deprecate ipcRenderer.sendTo() (#39091)
* feat: deprecate ipcRenderer.sendTo() * docs: add _Deprecated_ to ipcRenderer.sendTo()
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user