Stackedit/public/res/worker.js
2013-11-07 23:10:38 +00:00

16 lines
348 B
JavaScript

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