Stackedit/public/res/worker.js

16 lines
348 B
JavaScript
Raw Normal View History

2013-11-05 23:03:38 +00:00
/*jshint worker:true */
var isConfigured = false;
2013-10-05 01:30:54 +00:00
self.onmessage = function(e) {
if(isConfigured === false) {
2013-11-07 23:10:38 +00:00
/*jshint evil:true */
2013-10-05 01:30:54 +00:00
eval(e.data);
isConfigured = true;
}
else {
var data = JSON.parse(e.data);
var functionName = data.shift();
self[functionName].apply(this, data);
}
};