Via.js - worker calls demo

In this demo JavaScript calls on the DOM are forwarded to a worker, using almost the same code that would be written if the code was on the same thread. In this case the controller is the DOM and the receiver is the worker. Use the button below to calculate if a number is prime or not; the prime test is done on a worker, ensuring it won't jank the page if it takes a long time to test.

Result...