refactor: only allow internal messages from the main process (#27676)
This commit is contained in:
parent
e46446e7e4
commit
706d9ede9b
8 changed files with 16 additions and 33 deletions
2
typings/internal-electron.d.ts
vendored
2
typings/internal-electron.d.ts
vendored
|
@ -246,8 +246,6 @@ declare namespace ElectronInternal {
|
|||
|
||||
interface IpcRendererInternal extends Electron.IpcRenderer {
|
||||
invoke<T>(channel: string, ...args: any[]): Promise<T>;
|
||||
onMessageFromMain(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => void): this;
|
||||
onceMessageFromMain(channel: string, listener: (event: Electron.IpcRendererEvent, ...args: any[]) => void): this;
|
||||
}
|
||||
|
||||
// Internal IPC has _replyInternal and NO reply method
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue