- feat: allow to remove a once listener
- feat: support ESM
- feat: deprecate sendTo api
- fix: postMessage is available when context isolation is enabled #5
New way to remove a listener
const listener = (_, ...args): void => {}
const ipc = window.electron.ipcRenderer
// Old, remove listener not work
ipc.on(channel, listener)
ipc.removeListener(channel, listener)
// New
const removeListener = ipc.on(channel, listener)
removeListener()
- refactor: remove IpcRendererEvent type export and use Electron's own type
- refactor: remove listener
- refactor: deprecated IpcRenderer removeListener API
- chore: export IpcRendererListener type
- fix:
sendSync
does not return
exposeElectronAPI
method: A concise way to expose APIs in preload script- ipcRenderer: more APIs
- sendTo
- sendSync
- sendToHost
- postMessage
- removeAllListeners
- webFrame: more APIs
- setZoomFactor
- setZoomLevel
- process: more props
- env property
- preload: use wider range for peer deps
- expose
ipcRenderer
Electron APIs to the renderer process - expose
webFrame
Electron APIs to the renderer process - expose
process
Electron APIs to the renderer process