add maybe future code for loading workers from blobs
This commit is contained in:
parent
8292bac791
commit
87137e44d1
2 changed files with 27 additions and 21 deletions
|
|
@ -70,6 +70,10 @@ const client = exports({
|
|||
newWorker() {
|
||||
if (self.createWorker) {
|
||||
return self.createWorker();
|
||||
} else if (self.kiri_work) {
|
||||
const work = atob(self.kiri_work);
|
||||
const blob = new Blob([ work ], { type: 'application/javascript' });
|
||||
return new Worker(URL.createObjectURL(blob));
|
||||
} else {
|
||||
let _ = debug ? '_' : '';
|
||||
return new Worker(`/code/kiri_work.js?${_}${gapp.version}`);
|
||||
|
|
|
|||
Loading…
Reference in a new issue