我想在使用电子的浏览器中打开iframe链接。我找到了一些解决方案,但他们没有工作,这里有例子我想:在使用电子的浏览器中打开iframe链接
我认为问题是,该链接是在SCR标签。
寻找可能的解决办法,为什么没有什么工作
下面是一个例子iframe元素
<iframe src="https://rcm-eu.amazon-adsystem.com/e/cm?o=3&p=48&l=ur1&category=channels&banner=138WWDCBD6MQJVWGMHG2&f=ifr&linkID=0335593f7b48da8f8d1dab568039dc08&t=adrgoe-21&tracking_id=adrgoe-21" width="728" height="90" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>
这是我的电子代码
const shell = require('electron').shell;
// assuming $ is jQuery
$(document).on('click', 'a[href^="http"]', function(event) {
event.preventDefault();
shell.openExternal(this.href);
});
请提供代码,你有麻烦。 – escapesequence
https://pastebin.com/raw/XUdb7DdV – Adrian