windowOptions.ts 325 B

1234567891011
  1. /**
  2. * 主窗口 webPreferences。
  3. *
  4. * 渲染进程目前依赖 nodeIntegration 直接 require('electron') 调 IPC,
  5. * 若改成 contextIsolation,现有 preload 又没启用,行为会不一致。
  6. */
  7. export const sharedWebPreferences = {
  8. // webSecurity: false,
  9. contextIsolation: false,
  10. nodeIntegration: true,
  11. };