Skip to content

Commit

Permalink
feat: update launch func of vue skia framework
Browse files Browse the repository at this point in the history
  • Loading branch information
meloalright committed Apr 24, 2024
1 parent e767acf commit 41d3d0b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions vue-skia-framework/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ const launch = function () {
if (SSWInitialHelper.initialStatus === 0) {
SSWInitialHelper.initialStatus = 1;
const wasm = import("soft-skia-wasm/soft_skia_wasm.js");
wasm.then((ssw) => {
window.ssw = ssw;
while (SSWInitialHelper.initialSucceedCallbackQueue.length) {
SSWInitialHelper.initialSucceedCallbackQueue.pop()();
}
resolve(void 0)
wasm.then(async (ssw) => {
await ssw.default();
window.ssw = ssw;
while (SSWInitialHelper.initialSucceedCallbackQueue.length) {
SSWInitialHelper.initialSucceedCallbackQueue.pop()();
}
resolve(void 0)
})
} else if (SSWInitialHelper.initialStatus === 1) {
SSWInitialHelper.initialSucceedCallbackQueue.push(() => resolve(void 0));
Expand Down

0 comments on commit 41d3d0b

Please sign in to comment.