admin 管理员组

文章数量: 1184232

报错内容:

err---catch DOMException: Blocked a frame with origin "https://xxx" from accessing a cross-origin frame.

解决方案:在主进程文件中添加如下配置

//第一步
appmandLine.appendSwitch("disable-site-isolation-trials");

//第二步
webPreferences:{
  webSecurity: false//是否禁用同源策略
}

参考文档:electron如何跨域?electron 跨域方案之禁用 webSecurity

本文标签: Electron iframe