We can use the web worker in HTML5 like this:
var worker = new Worker(\'worker.js\');
but why can\'t we call a function like this?
By design web workers are multi-threaded, javascript is single threaded"*"multiple scripts cannot run at the same time.
refer to: http://www.html5rocks.com/en/tutorials/workers/basics/