Repository navigation
Major Changes
-
#231
bb5a2d9Thanks @jsonnull! - Breaking change:createIPCHandlerregisters electron-trpc's preload script itself, on the default session or the sessions passed aspreload: { sessions }, so apps no longer need one. Apps that expose electron-trpc from their own preload script passpreload: falseand importexposeElectronTRPCfromelectron-trpc/preloadinstead ofelectron-trpc/main. If a build bundles electron-trpc without its preload script,createIPCHandlerthrows an error explaining how to expose it from your own preload script instead. -
#231
bb5a2d9Thanks @jsonnull! - Breaking change:createIPCHandlerreturns aDisposablehandler that serves every window, replacing thewindowsoption andattachWindow/detachWindow. Requests are cancelled when their page navigates away, reloads, crashes or closes, and disposing the handler cancels everything still running. -
#231
bb5a2d9Thanks @jsonnull! - Breaking change: Requires tRPC 11 and Electron 35 or later. Pass transformers toipcLinkinstead of the client, as with tRPC 11's other links.
Minor Changes
- #231
bb5a2d9Thanks @jsonnull! - Add anallowoption tocreateIPCHandler, which decides whether to handle each request, e.g. based onevent.senderFrame.url. Rejected requests fail with aFORBIDDENerror.