admin管理员组文章数量:1201374
Request for Support Background: I am currently upgrading the project from Electron 15 to Electron 29, but the embedded document websites consistently pop up a font download popup window. Problem: When using BrowserView, WebView, or iframe in the project to reference external websites, this popup window will appear when a specific font does not exist on Mac. This font download popup window did not exist in version 15. I want to keep it consistent with version 15. Which feature of Electron or Chrome has led to this phenomenon? How should I set it? Below is a screenshot.
I hope that, just like in Electron 15, this pop - up can be skipped entirely, and the default font can be used directly. This is because such an experience is really bad for users.
//You can copy this code into electron fiddle, as long as you don't have the Chinese Song fonts on your computer
// main.js
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
webSecurity: false,
webviewTag: true,
contextIsolation: false,
nodeIntegration: true,
nodeIntegrationInWorker: true,
}
})
//index.html
<webview
src=";
nodeintegrationinsubframes="true"
webpreferences="contextIsolation=no, sandbox=false"
allowpopups="true"
/>
本文标签:
版权声明:本文标题:webview - I am currently upgrading the project from Electron 15 to 29, but the embedded document websites consistently pop up a 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738556978a2098485.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论