【发布时间】:2024-01-02 12:27:01
【问题描述】:
我用的是电子官方样本“https://github.com/hokein/electron-sample-apps/tree/master/webview/browser”
使用以下命令:
/home/roroco/.node/node_modules/bin/electron /home/roroco/Downloads/js/electron-sample-apps/webview/browser/main.js
电子窗口控制台没有任何错误
我尝试打开 webview devtools 但它没有打开
const webview = document.querySelector('webview')
webview.addEventListener('dom-ready', () => {
webview.openDevTools()
})
我猜是linux环境的问题,可能windows和mac都有这个bug,这是我的环境:
roroco@roroco ~/Downloads/js/electron-sample-apps $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 19.1 Tessa
Release: 19.1
Codename: tessa
【问题讨论】:
标签: javascript electron