electron-设置跨域iframeJAY.LIN 收录于 未分类 2025-03-13 约 66 字 预计阅读 1 分钟 目录 electron 设置跨域iframe在 Electron 的主进程中禁用同源策略在 Electron 的主进程文件中添加 app.commandLine.appendSwitch("disable-site-isolation-trials"); 来禁用站点隔离试验。在创建 BrowserWindow 时,设置 webPreferences 的 webSecurity: false 来禁用同源策略。Please enable JavaScript to view the comments powered by Giscus.