Skip to content

How can I expose functions from the main process to the renderer? #37

Answered by Deluze
finnd0 asked this question in Q&A
Discussion options

You must be logged in to vote

Did you remove the ipcRenderer from the Context Bridge in preload.ts by any chance? By default the template comes with a really simple example on how to use ipcMain and ipcRenderer.

If you want to use anything from NodeJS, make sure to expose it using the Context Bridge. You can also enable nodeIntegration during window construction (not recommended).

Hope this helps.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Deluze
Comment options

@finnd0
Comment options

@Deluze
Comment options

@onequid
Comment options

Answer selected by finnd0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants