- 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.
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- C語言程序設計實踐教程(第2版)
- Python編程自學手冊
- JavaScript高效圖形編程
- The Android Game Developer's Handbook
- PyTorch Artificial Intelligence Fundamentals
- 64位匯編語言的編程藝術
- jQuery開發基礎教程
- Building Android UIs with Custom Views
- C語言開發基礎教程(Dev-C++)(第2版)
- Quantum Computing and Blockchain in Business
- Web性能實戰
- Practical Microservices
- 創意UI Photoshop玩轉移動UI設計
- UI設計基礎培訓教程(全彩版)