【发布时间】:2020-12-29 21:40:13
【问题描述】:
呈现器进程中存在的Webview标签,位于<body>:
<webview src="http://somewebpage.com" preload="somescript.js">
somescript.js在somewebpage中执行,但如果somewebpage中有<iframe>s,则脚本不会在iframe中运行。
我怎样才能让它运行?在 iframe 中的任何其他脚本之前?
我在 github 上发现了这个似乎相关的问题: https://github.com/electron/electron/pull/19260 但这没有任何意义……
我尝试添加 nodeintegrationinsubframes 并将值从 false 更改为 true
<webview src="somewebpage" preload="somescript.js" nodeintegrationinsubframes="false">
但它没有效果:(
【问题讨论】:
标签: javascript node.js iframe webview electron