fix: ensure that internal messages are sent from the main process (#26429)

This commit is contained in:
Milan Burda 2020-11-12 04:20:01 +01:00 committed by GitHub
parent 83d30c5c2a
commit 5ee9cc202b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 9 deletions

View file

@ -232,7 +232,9 @@ declare namespace ElectronInternal {
interface IpcRendererInternal extends Electron.IpcRenderer {
invoke<T>(channel: string, ...args: any[]): Promise<T>;
sendToAll(webContentsId: number, channel: string, ...args: any[]): void
sendToAll(webContentsId: number, channel: string, ...args: any[]): void;
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