Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const electron = require('electron');
- const url = require('url'); //nodejs core module
- const path = require('path');
- const {app, BrowserWindow} = electron;
- let mainWindow;
- //Listen for app to be ready
- app.on('ready', function(){
- //Create new window
- mainWindow = new BrowserWindow({});
- //Load html into window
- mainWindow.loadURL(url.format({
- pathname: path.join(__dirname, 'mainWindow.html'),
- protocol:'file:',
- slashes:true
- }));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement