electron/spec-main/fixtures/api/test-menu-visibility/main.js
2020-03-20 13:28:31 -07:00

16 lines
345 B
JavaScript

const { app, BrowserWindow } = require('electron');
let win;
app.whenReady().then(function () {
win = new BrowserWindow({});
win.setMenuBarVisibility(false);
setTimeout(() => {
if (win.isMenuBarVisible()) {
console.log('Window has a menu');
} else {
console.log('Window has no menu');
}
app.quit();
});
});