worker.js 415 B

1234567891011
  1. "use strict";
  2. exports.__esModule = true;
  3. var ch2 = {};
  4. exports["default"] = (function (c, id, msg, transfer, cb) {
  5. var u = ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([c], { type: 'text/javascript' })));
  6. var w = new Worker(u);
  7. w.onerror = function (e) { return cb(e.error, null); };
  8. w.onmessage = function (e) { return cb(null, e.data); };
  9. w.postMessage(msg, transfer);
  10. return w;
  11. });