Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
add removeAllListeners to the ipc wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
frozeman committed Jan 11, 2016
1 parent b2be459 commit 3c86c2c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions modules/ipc/ipcProviderWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ipcProviderWrapper = {
callback(result);
});

// rely to all webviews
// relay to all webviews
}

if(name === 'error'){
Expand All @@ -60,11 +60,19 @@ ipcProviderWrapper = {
}

// dont send the end connection error
// if(name === 'end'){
// ipc.on('ipcProvider-end', function(e, result){
// callback(result);
// });
// }
if(name === 'end'){
ipc.on('ipcProvider-end', function(e, result){
callback(result);
});
}
},
/**
Removes listeners
@method removeAllListeners
*/
removeAllListeners: function(type){
ipc.removeAllListeners('ipcProvider-'+ type);
},
/**
Write to the IPC connection through the backend
Expand Down

0 comments on commit 3c86c2c

Please sign in to comment.