add maybe future code for loading workers from blobs

This commit is contained in:
Stewart Allen 2025-06-27 16:49:04 -04:00
commit 87137e44d1
2 changed files with 27 additions and 21 deletions

View file

@ -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}`);