- 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.
推薦閱讀
- 精通Nginx(第2版)
- Photoshop智能手機APP UI設計之道
- Python入門很簡單
- 深入淺出Windows API程序設計:編程基礎篇
- Asynchronous Android Programming(Second Edition)
- Swift Playgrounds少兒趣編程
- HTML5+CSS3 Web前端開發技術(第2版)
- ElasticSearch Cookbook(Second Edition)
- Visual Basic 6.0程序設計實驗教程
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- Moodle 3 Administration(Third Edition)
- UML基礎與Rose建模實用教程(第三版)
- Puppet 5 Beginner's Guide(Third Edition)
- 用Python動手學統計學
- Implementing Domain:Specific Languages with Xtext and Xtend