Closed davkle closed 3 years ago
Hi, now we don't use ipcMain or ipcRenderer, but a wrapper around these two @wexond/rpc-electron
. You can read the docs here: https://github.com/wexond/browser-base/blob/master/docs/development.md#ipc
If you want to notify a renderer that a blur or focus event occurred, I would create a listener to BrowserWindow blur
event and then use windowRendererChannel.getInvoker(browserWindow.webContents).onBlur()
and handle that IPC message in the renderer process.
Hey,
I have a general question (potentially fitting label would be documentation I suppose):
I want to change indicators (e.g., the layout (i.e., the color) of the address bar) based on events occurring on the website. Emitting events from the website and receiving it via ipcMain (in app.ts in src/main/windows) works so far. What I didn't figure out is how to for example notify the address bar based on the received events in app.ts to e.g., change the background color.
Everything I tried sends the response back to the renderer which emitted the event, which does not really help me.
Can you give me a hint on how to achieve this?
Cheers