Workers can be created in a few ways.
The most common is from a simple URL:
var webworker = new Worker("./path/to/webworker.js");
It's also possible to create a Worker dynamically from a string using
The same method can be combined with
Function.toString() to create a worker from an existing function: