settingWindow = new BrowserWindow({
width: 800,
height: 600,
frame: false,
maximizable: false,
fullscreenable: false,
resizable: false,
webPreferences: windowOption,
});
︙
<head>
︙
<!--場合によっては必要-->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self' 'unsafe-eval' 'unsafe-inline';"
/>
<meta
http-equiv="X-Content-Security-Policy"
content="default-src 'self';"
/>
<!---->
︙
</head>
︙
<body style="-webkit-app-region: drag">
︙
</body>
︙
- Frameless Window
- javascript - How do I enable the ability to move a frameless window in Electron and Svelte? - Stack Overflow
- javascript - Refused to apply inline style because it violates the following Content Security Policy directive - Stack Overflow
- setSizeの処理の前に、setMinimumSizeを指定する
︙
win.setMinimumSize(minWidth, minHeight);
win.setSize(width, height);
︙
const menu = new Menu();
menu.popup({ window: windowInstance });