Closed spyynz closed 2 years ago
enable the remote module?
yes but I get the same error except instead of 'Menu' it's 'getElementByClass'
Is this an issue with this package?
No, it's not.
Can you share a bit of what you've tried so far?
And can you test this simple example (custom-electron-titlebar-minimal-example) and see if it works for you?
fwiw, use with remoteModuleEnabled: false, requires some rearchitecture, probably https://github.com/AlexTorresSk/custom-electron-titlebar/issues/136
I'm facing the same issue.
Uncaught TypeError: Cannot read property 'Menu' of undefined C:\...\node_modules\custom-electron-titlebar\lib\titlebar.js:31
Here are my webPreferences settings:
webPreferences: {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
preload: path.join(__dirname, 'preload.js')
}
Node.js 14.16.0 Chromium 89.0.4389.128 Electron 12.0.7
yes but I get the same error except instead of 'Menu' it's 'getElementByClass'
I got it working by using
window.addEventListener('DOMContentLoaded', () => {
new customTitleBar.Titlebar()
});
I get an error every single time I try to use this even when I follow tutorials. I have done step-by-step tutorials, read docs, etc. and it still shows this error. What do I do??? Is this an issue with this package?