webpack/examples/wasm-complex/memory.js

8 lines
211 B
JavaScript
Raw Normal View History

2019-05-24 20:24:44 +08:00
async function getMemoryFromParentInWorker() {
await new Promise(r => setTimeout(r, 200));
// fake
return new WebAssembly.Memory({ initial: 1 });
}
export const memory = await getMemoryFromParentInWorker();