summaryrefslogtreecommitdiffstats
path: root/src/webview/plugin.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/plugin.js')
-rw-r--r--src/webview/plugin.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/webview/plugin.js b/src/webview/plugin.js
index 52b19b3fd..c6530fef6 100644
--- a/src/webview/plugin.js
+++ b/src/webview/plugin.js
@@ -8,6 +8,8 @@ import RecipeWebview from './lib/RecipeWebview';
8import Spellchecker from './spellchecker'; 8import Spellchecker from './spellchecker';
9import './notifications'; 9import './notifications';
10 10
11const debug = require('debug')('Plugin');
12
11ipcRenderer.on('initializeRecipe', (e, data) => { 13ipcRenderer.on('initializeRecipe', (e, data) => {
12 const modulePath = path.join(data.recipe.path, 'webview.js'); 14 const modulePath = path.join(data.recipe.path, 'webview.js');
13 // Delete module from cache 15 // Delete module from cache
@@ -15,8 +17,9 @@ ipcRenderer.on('initializeRecipe', (e, data) => {
15 try { 17 try {
16 // eslint-disable-next-line 18 // eslint-disable-next-line
17 require(modulePath)(new RecipeWebview(), data); 19 require(modulePath)(new RecipeWebview(), data);
20 debug('Initialize Recipe');
18 } catch (err) { 21 } catch (err) {
19 console.error(err); 22 debug('Recipe initialization failed', err);
20 } 23 }
21}); 24});
22 25
@@ -31,6 +34,7 @@ new ContextMenuListener((info) => { // eslint-disable-line
31 34
32ipcRenderer.on('settings-update', (e, data) => { 35ipcRenderer.on('settings-update', (e, data) => {
33 spellchecker.toggleSpellchecker(data.enableSpellchecking); 36 spellchecker.toggleSpellchecker(data.enableSpellchecking);
37 debug('Settings update received', data);
34}); 38});
35 39
36// initSpellche 40// initSpellche