()
| 109 | } |
| 110 | |
| 111 | function createBrowserWindow(): BrowserWindow { |
| 112 | const window = new BrowserWindow({ |
| 113 | title: 'Flashpoint Browser Mode', |
| 114 | icon: path.join(__dirname, '../window/images/icon.png'), |
| 115 | useContentSize: true, |
| 116 | width: init.args.width, |
| 117 | height: init.args.height, |
| 118 | webPreferences: { |
| 119 | nodeIntegration: false, |
| 120 | plugins: true, |
| 121 | }, |
| 122 | }); |
| 123 | remoteMain.enable(window.webContents); |
| 124 | window.setMenu(null); // Remove the menu bar |
| 125 | window.loadURL(state.url); |
| 126 | |
| 127 | // window.webContents.openDevTools(); |
| 128 | |
| 129 | window.on('closed', () => { |
| 130 | if (state.window === window) { |
| 131 | state.window = undefined; |
| 132 | } |
| 133 | }); |
| 134 | |
| 135 | return window; |
| 136 | } |
| 137 | } |
no test coverage detected