-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
45 lines (34 loc) · 842 Bytes
/
app.js
File metadata and controls
45 lines (34 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const {
app,
BrowserWindow,
Menu
} = require('electron')
let appWindow
function createWindow() {
appWindow = new BrowserWindow({
width: 1200,
height: 1020,
minHeight: 1020,
webPreferences: {
resizeable: false,
nodeIntegration: true,
contextIsolation: false,
webviewTag: true
}
})
Menu.setApplicationMenu(null)
appWindow.loadFile('dist/untitled1/browser/index.html');
appWindow.webContents.on('did-fail-load', (event, errorCode, errorDescription) => {
console.log('Fehler beim Laden:', errorDescription);
});
appWindow.on('closed', function () {
appWindow = null
});
appWindow.webContents.on('will-navigate', (event, url) => {
// Verhindern Sie externe Navigationen
event.preventDefault();
});
}
app.whenReady().then(() => {
createWindow()
});