A local browser lab for dedicated Web Workers. Send structured objects, transfer an ArrayBuffer, and observe message order, worker errors, and termination.
- 📨 Send nested objects through
postMessage(). - 🔁 Transfer an
ArrayBufferand observe the sender's detached buffer. - 🔢 Queue ordered messages and inspect their replies.
- ⏹️ Restart or terminate the Worker.
- 🔒 All examples run inside the browser; nothing is uploaded.
Run the local Node.js server; no hosted demo is configured.
npm startOpen http://127.0.0.1:4175.
- Node.js built-in HTTP server
- Dedicated Web Workers
- Structured Clone Algorithm and Transferable Objects
- Vanilla JavaScript, HTML, and CSS
.
├── assets/mark.svg
├── public/app.js
├── public/index.html
├── public/styles.css
├── public/worker.js
├── package.json
├── server.js
└── README.md
- Add a SharedWorker comparison.
- Demonstrate messageerror with an unsupported payload.
- Add a small transferable typed-array exercise.
Keep examples deterministic and document which data is cloned versus transferred.
MIT. See LICENSE.