Hello World!
✓ Published0🌍 Public
ZZaitsev
Last edited Apr 18, 2024
Created on Apr 18, 2024
This example demonstrates a minimal Electron application that displays runtime versions for Node.js, Chromium, and Electron while also enabling worker-thread communication. It shows a button that triggers a streaming data exchange via the MessageChannel API, where a worker thread sends ten messages back to the renderer process. The main process uses `ipcMain.on` to handle requests and spawns a Node.js Worker, while the renderer relies on `ipcRenderer.postMessage` and `MessageChannel` ports for bidirectional messaging. The code uses Electron 28, Node.js worker threads, and plain HTML/CSS for the interface.
AI-generated description