mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 16:02:32 +00:00
* fix(browser): prevent window.close guest crashes * fix(browser): guard close before inline scripts * fix(browser): preserve explicit window close policy
8 lines
380 B
TypeScript
8 lines
380 B
TypeScript
import { installBrowserWindowCloseGuard } from './browser-window-close-installation'
|
|
import type { ContextBridge } from 'electron'
|
|
|
|
// Why: raw require keeps the sandboxed preload standalone in the main-process CJS build.
|
|
const { contextBridge } = require('electron') as { contextBridge: ContextBridge }
|
|
|
|
contextBridge.executeInMainWorld({ func: installBrowserWindowCloseGuard })
|