WEB WORKERS

The Web Workers paradigm allows to write multi-threading code in JavaScript.

Remark: since the Web Workers code is placed in some external files (i.e. not this page) they can not access the window, document and parent JavaScript objects.

For a simple introduction about Web Workers see W3C Schools. A more complete tutorial is available on HTML5 Rocks. For a discussion about the security issues of the postMessage() function see Mozilla reference site.

To browse the code click on the Show Code, Show Markup and Show Web Worker labels below.







Show code


Show 1st Web Worker


Show 2nd Web Worker


Show markup