The process is sent to the webworker according to the conditions in a loop as follows.
while () { if (~~~) { worker.postMessage({ action: "init"