Closed alexstrat closed 6 years ago
Usage:
// renderer chrome.webRequest.onBeforeRequest = new RCEvent(`${extensionId}-webRequest.onBeforeRequest`) // main const eventControler = new new RCEventControler(`${extensionId}-webRequest.onBeforeRequest`) eventControler.on('new-listener', (listenerArgs, remoteCallListener) => { const filter = listenerArgs[0] electron.webRequest.onBeforeRequest(filter, (details, callback) => { remoteCallListener(details).then(cbReturn => callback(cbReturn)); }) })
Usage: