mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
[PR #560] Allow IpcMain to send IPC messages to BrowserViews #1215
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/ElectronNET/Electron.NET/pull/560
State: closed
Merged: Yes
Currently,
IpcMaincan only send IPC messages toBrowserWindows, because theSendmethod'sbrowserWindowparameter is strongly typed toBrowserWindow. This PR overloads theSendmethod to accept aBrowserViewas well, emitting thesendToIpcRendererBrowserViewsocket message with the same implementation. The host receives this message inipc.ts, locates theBrowserViewwith the given ID from the globalbrowserViewsarray created inbrowserView.ts, and sends the IPC message to itswebContents.