MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / createBrowserWindow

Function createBrowserWindow

src/main/BrowserMode.ts:111–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers 2

onAppReadyFunction · 0.70
onAppActivateFunction · 0.70

Calls 1

onMethod · 0.65

Tested by

no test coverage detected