Skip to content

Instantly share code, notes, and snippets.

/* A facade for the Web Worker API that fakes it in case it's missing.
Good when web workers aren't supported in the browser, but it's still fast enough, so execution doesn't hang too badly (e.g. Opera 10.5).
By Stefan Wehrmeyer, licensed under MIT
*/
var WorkerFacade;
if(!!window.Worker && !iCanHasFastBrowser()){
WorkerFacade = (function(){
return function(path){
return new window.Worker(path);