Slbox
Slbox

Reputation: 13108

Electron Preload a function instead of an external file?

I don't think this is possible, but I can't find any clear documentation saying it is not.

The preload feature I'm referring to is referenced here in the docs: https://electronjs.org/docs/api/browser-window

Upvotes: 0

Views: 542

Answers (1)

OJ Kwon
OJ Kwon

Reputation: 4641

You can't. It should be file, as internally Electron reads file and execute it.

Upvotes: 1

Related Questions