Back to Wails

Web Workers API Demo

v3/examples/web-apis/webworkers/frontend/index.html

2.13.0764 B
Original Source

Web Workers API Demo

Web Workers allow JavaScript to run in background threads, enabling CPU-intensive tasks without blocking the UI.

Web Workers: checking...

Prime Number Calculator

Calculate prime numbers up to a given limit. Try with/without a worker to see the difference.

Calculate primes up to:

This animation should stay smooth when using a worker Calculate with WorkerCalculate WITHOUT Worker (blocks UI)Terminate Worker

Results will appear here...

Fibonacci Calculator

Calculate Fibonacci numbers using a dedicated worker.

Calculate Fibonacci(n):Calculate Result will appear here...

Message Passing

Send custom messages to a worker and receive responses.

Message to send:Send to Worker Messages will appear here...

API Support