MCPcopy
hub / github.com/benoitvallon/react-native-nw-react-calculator / createWindow

Function createWindow

electron.js:13–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11let mainWindow;
12
13function createWindow () {
14 // Create the browser window.
15 mainWindow = new BrowserWindow({
16 minWidth: 300,
17 minHeight: 475,
18 maxWidth: 800,
19 maxHeight: 600
20 });
21
22 // and load the index.html of the app.
23 mainWindow.loadURL('file://' + __dirname + '/index.desktop.html');
24
25 // Open the DevTools.
26 mainWindow.webContents.openDevTools();
27
28 // Emitted when the window is closed.
29 mainWindow.on('closed', function() {
30 // Dereference the window object, usually you would store windows
31 // in an array if your app supports multi windows, this is the time
32 // when you should delete the corresponding element.
33 mainWindow = null;
34 });
35}
36
37// This method will be called when Electron has finished
38// initialization and is ready to create browser windows.

Callers 1

electron.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected