Electron-228 - Added an event to terminate screen snippet process whenever the main window is reloaded/navigated

This commit is contained in:
kiranniranjan
2018-01-18 12:53:27 +05:30
parent 665f35b08e
commit 20e1f0b6ca
4 changed files with 38 additions and 5 deletions

View File

@@ -181,6 +181,14 @@ function createWarn(msg) {
}
/* eslint-enable class-methods-use-this */
// terminates the screen snippet process wherever the
// main window is reloaded/navigated
eventEmitter.on('killScreenSnippet', function () {
if (child) {
child.kill();
}
});
module.exports = {
ScreenSnippet: ScreenSnippet,
// note: readResult only exposed for testing purposes