theseus/collision-preload.js

8 lines
413 B
JavaScript
Raw Normal View History

2026-09-12 00:07:42 +02:00
// Minimal, sandboxed IPC bridge for the "Open with…" collision prompt window.
// Only exposes the exact call the page needs: send the user's choice back to
// the main process (which awaits it via ipcMain.once).
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("collisionApi", {
choose(host, payload) { ipcRenderer.send(`collision-choose:${host}`, payload); },
});