- 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.
推薦閱讀
- Google Flutter Mobile Development Quick Start Guide
- 微信公眾平臺與小程序開發:從零搭建整套系統
- Learning Apex Programming
- JavaScript:Functional Programming for JavaScript Developers
- Flink SQL與DataStream入門、進階與實戰
- Learning Elixir
- Koa開發:入門、進階與實戰
- Hands-On Neural Network Programming with C#
- Visual Basic程序設計基礎
- Google Adsense優化實戰
- 3D Printing Designs:The Sun Puzzle
- Java EE程序設計與開發實踐教程
- Learning Gerrit Code Review
- C#教程
- Switching to Angular 2