简体   繁体   English

电子预加载功能而不是外部文件?

[英]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 我在此引用的preload功能在文档中引用: https : //electronjs.org/docs/api/browser-window

You can't. 你不能 It should be file, as internally Electron reads file and execute it. 它应该是文件,因为Electron内部会读取文件并执行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM