- Electron Projects
- Denys Vuika
- 83字
- 2021-06-24 12:14:38
Introducing editor-event
Let's introduce editor-event so that we can handle messages from Node.js . We need to import an ipcRenderer object from the Electron framework and listen to any channel. In this case, it is going to be editor-event. For the sake of simplicity, let's output the message's content to the browser console:
<script>
const { ipcRenderer } = require('electron');
ipcRenderer.on('editor-event', (event, arg) => {
console.log(arg);
});
</script>
The preceding code listens to the editor-event channel and writes the message to the browser console's output.
推薦閱讀
- Mastering Natural Language Processing with Python
- MySQL數據庫管理與開發實踐教程 (清華電腦學堂)
- 大學計算機基礎實驗指導
- 劍指大數據:企業級數據倉庫項目實戰(在線教育版)
- HTML5權威指南
- 軟件體系結構
- SQL Server 入門很輕松(微課超值版)
- OpenCV Android Programming By Example
- 超簡單:用Python讓Excel飛起來(實戰150例)
- Web前端測試與集成:Jasmine/Selenium/Protractor/Jenkins的最佳實踐
- Spring Web Services 2 Cookbook
- 趣學數據結構
- 像程序員一樣使用MySQL
- 匯編語言程序設計教程
- 企業應用架構模式