IPC listener which will cache the callbacks for easily clear.
npm install --save electron-ipc-listener
const IpcListener = require('electron-ipc-listener');
let ipcListener = new IpcListener();
ipcListener.on('foo:bar', event => {
// do something...
});
// ...
// ...
// once you do not need the ipcListener ...
ipcListener.clear();
message
stringcallback
function
Register IPC message and respond it with the callback function.
message
stringcallback
function
Register IPC message and respond it once with the callback function.
Clear all registered IPC messages in the listener.
MIT © 2017 Johnny Wu