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

Function onAppWebContentsCreated

src/main/LogsWindow.ts:141–151  ·  view source on GitHub ↗
(event: Electron.Event, webContents: Electron.WebContents)

Source from the content-addressed store, hash-verified

139 }
140
141 function onAppWebContentsCreated(event: Electron.Event, webContents: Electron.WebContents): void {
142 // Open links to web pages in the OS-es default browser
143 // (instead of navigating to it with the electron window that opened it)
144 webContents.on('will-navigate', onNewPage);
145 webContents.on('new-window', onNewPage);
146
147 function onNewPage(event: Electron.Event, navigationUrl: string): void {
148 event.preventDefault();
149 shell.openExternal(navigationUrl);
150 }
151 }
152
153 function onAppActivate(): void {
154 // On OS X it's common to re-create a window in the app when the

Callers

nothing calls this directly

Calls 1

onMethod · 0.65

Tested by

no test coverage detected