You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is a bug, this could easily me be me not understanding enough of electron.
I try to sent messages from the pre load script to the render.
The preload script is basically a communication bridge that allows the renderer process to access the main process' API. It is not recommended to include the behavioral process logic of specific features.
In general, using the Node API is not recommended for security reasons in the renderer process and the main process will receive and process Node API requests.
Vutron runs in a context-isolated environment and there is a way to use the window's eventListener object to send messages from the preload script to the renderer process.
preload/index.ts
// Send to renderer from preload scriptwindow.postMessage('ping')
Thank you for the info. I would love to use the ipc methods.
In preload/index.ts I see 'mainApi' exposed. I think this part allow me to whitelist the allowed channels for render to main
But I don't see how I can use that for the other way around. Is there something for that like ipcMain.send()
Not sure if this is a bug, this could easily me be me not understanding enough of electron.
I try to sent messages from the pre load script to the render.
I tried stuff like:
But somehow it doesn't get picked-up in the vue side.
Where I subscribed like:
Could you add some examples to the documentation how to achieve this?
The text was updated successfully, but these errors were encountered: