Skip to content

Instantly share code, notes, and snippets.

@waltervargas
Created November 17, 2016 02:44
Show Gist options
  • Save waltervargas/c6c6268d97a567b5776b7384a52df054 to your computer and use it in GitHub Desktop.
Save waltervargas/c6c6268d97a567b5776b7384a52df054 to your computer and use it in GitHub Desktop.
electron window surfi
app.on('ready', function() {
mainWindow = new BrowserWindow({
width: 350, height: 500, frame: true, transparent: false,
titleBarStyle: 'hidden-inset',
webPreferences: {
nodeIntegration: true,
webSecurity: false,
plugins: true
}
});
mainWindow.loadUrl('file://' + __dirname + '/app/index.html');
mainWindow.openDevTools();
mainWindow.on('closed', function() {
mainWindow = null;
});
mainWindow.webContents.on('did-finish-load', () => {
mainWindow.webContents.send('surfi', Surfi);
});
});
@waltervargas
Copy link
Author

@reinaldoleon check this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment