WorkerScript.onMessage = function(msg) { var result = null try { for (var i=0; i