我正在尝试在电子上制作自定义标题栏。但是当我启动我的应用程序时,我遇到了“ReferenceError: navigator is not defined”的问题。请帮忙。这是我的 main.js 中的代码片段
// 1. Require the installed module
const customTitlebar = require('custom-electron-titlebar');
// 2. Create the custom titlebar with your own settings
// To make it work, we just need to provide the backgroundColor property
// Other properties are optional.
let MyTitleBar = new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex('#03a9f4')});