electron-ipcmain-messageport
Turns Electron IPCMain
into MessagePort.
Background
Instead of learning/using different API for different communication channels, we should unite them into a single interface pattern, either MessagePort or WebSocket.
How to use
const BrowserWindow ipcMain = ;const window = ;const messagePort = ipcMain window 'channel_name'; messagePort
Note: to match the paradigm of MessagePort, we do not support synchronous messages and callbacks.
Contributions
Like us? Star us.
Want to make it better? File us an issue.
Don't like something you see? Submit a pull request.