Stackedit/public/res/worker.js
2013-11-05 23:03:38 +00:00

17 lines
390 B
JavaScript

/*jshint worker:true */
var isConfigured = false;
/*jshint evil:true, unused:false */
self.onmessage = function(e) {
if(isConfigured === false) {
eval(e.data);
isConfigured = true;
}
else {
var data = JSON.parse(e.data);
var functionName = data.shift();
self[functionName].apply(this, data);
}
};
/*jshint evil:false, unused:true */