Skip to content

Commit

Permalink
update engine test to new worker
Browse files Browse the repository at this point in the history
  • Loading branch information
hrgdavor committed Mar 12, 2024
1 parent 322328e commit 22ed872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/engine-test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ document.body.ondrop = async ev => {
const { alias, script } = await fileDropped(sw, files)
projectName = sw.projectName
if (alias.length) {
sendNotify('init', [{ alias }])
workerApi.init({ alias })
}
runScript({ url: sw.fileToRun, base: sw.base })
} catch (error) {
Expand Down Expand Up @@ -246,7 +246,7 @@ async function initFs() {
sw = await registerServiceWorker('bundle.fs-serviceworker.js?prefix=/swfs/')
sw.defProjectName = 'jscad'
sw.onfileschange = files => {
sendNotify('clearFileCache', [{ files }])
workerApi.clearFileCache({ files })
if (sw.fileToRun) runScript({ url: sw.fileToRun, base: sw.base })
}
}
Expand Down

0 comments on commit 22ed872

Please sign in to comment.