diff options
Diffstat (limited to 'src/modules/window.js')
-rw-r--r-- | src/modules/window.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/modules/window.js b/src/modules/window.js new file mode 100644 index 0000000..3b5c76f --- /dev/null +++ b/src/modules/window.js @@ -0,0 +1,15 @@ +const ipcMain = require("electron").ipcMain; + +let win = {}; + +// logs into the dev tools of the renderer +win.log = (msg) => { + ipcMain.emit("win-log", msg, msg); +} + +// sends an alert to the renderer +win.alert = (msg) => { + ipcMain.emit("win-alert", msg, msg); +} + +module.exports = win; |