INNER CODE UNIT · TypeScript

requireTrustedRenderer

BlockRunAI/ClawRouter · apps/desktop/electron/main.ts:19

function requireTrustedRenderer(event: IpcMainInvokeEvent): void {
  const senderUrl = event.senderFrame?.url ?? event.sender.getURL();
  if (!isTrustedRendererUrl(senderUrl, rendererFile)) throw new Error("Untrusted renderer");
}

function createWindow() {
  window = new BrowserWindow({
    width: 1180,
    height: 760,
    minWidth: 920,
    minHeight: 620,
    titleBarStyle: process.platform === "darwin" ? "hiddenInset" : "default",
    backgroundColor: nativeTheme.shouldUseDarkColors ? "#0a0a0a" : "#f4f4f3",
    show: true,
    webPreferences: {
      preload: join(__dirname, "preload.cjs"),
      contextIsolation: true,
      nodeIntegration: false,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…