我正在尝试使用电子的BrowserView将第三方 Web 内容嵌入到 Electron BrowserWindow 中。
我的电子版是10
。
// In the main process.
const { BrowserView, BrowserWindow } = require('electron')
const win = new BrowserWindow({ width: 800, height: 600 })
const view = new BrowserView()
win.setBrowserView(view)
view.setBounds({ x: 0, y: 0, width: 300, height: 300 })
view.webContents.loadURL('https://electronjs.org')
这工作正常,现在我想scrollbars
通过添加一行来隐藏
view.webContents.insertCSS('html, body { overflow: hidden; }')
但这不是隐藏滚动条。我怎么能躲进scrollbar
去BrowserView
?