Skip to content

Instantly share code, notes, and snippets.

View sanoopjose's full-sized avatar

Sanoop Jose sanoopjose

View GitHub Profile
@Gvozd
Gvozd / main.js
Created July 4, 2018 09:37
Facebook, OAuth login. Correct opener in window
mainWindow = new BrowserWindow({
webPreferences: {
nativeWindowOpen: true,// window.open return Window object(like in regular browsers), not BrowserWindowProxy
affinity: 'main-window'// main window, and addition windows should work in one process
}
});
mainWindow.webContents.on('new-window', function (e, url, frameName, disposition, options) {
// hook on new opened window