从WebView将脚本注入主dom

时间:2019-03-31 09:30:06

标签: javascript google-chrome electron

我有电子应用程序,由于某些原因,我想将节点js脚本注入到加载了webview的主html页面中,因此我正在将其加载到webview中。 webview的nodeintegration为false,但allow-pops为true,disable-web-security为true。

或以任何方式将js文件保存在内存中,并将其用作电子应用程序中的预加载脚本,例如

window.open(“ new-url”,_blank,“ file:// that-script-in-memory”)

0 个答案:

没有答案