Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow IpcMain to send IPC messages to BrowserViews #560

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Allow IpcMain to send IPC messages to BrowserViews #560

merged 1 commit into from
Jul 1, 2021

Conversation

nfichter
Copy link

Currently, IpcMain can only send IPC messages to BrowserWindows, because the Send method's browserWindow parameter is strongly typed to BrowserWindow. This PR overloads the Send method to accept a BrowserView as well, emitting the sendToIpcRendererBrowserView socket message with the same implementation. The host receives this message in ipc.ts, locates the BrowserView with the given ID from the global browserViews array created in browserView.ts, and sends the IPC message to its webContents.

@GregorBiswanger GregorBiswanger self-assigned this Jul 1, 2021
@GregorBiswanger GregorBiswanger added this to the 13.5.1 milestone Jul 1, 2021
@GregorBiswanger GregorBiswanger merged commit f0280f4 into ElectronNET:master Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants