Skip to content

Commit ac3abbb

Browse files
author
Arash Abedinzadeh
committed
Replace WebAssembly.instantiateStreaming() with WebAssembly.instantiate()
WebAssembly.instantiateStreaming() is not supported on any iOS/OSX version yet.
1 parent ddfa4b8 commit ac3abbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/main.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ function register_object(wasm_module, wasm_instance) {
116116
};
117117

118118
fetch("rstetris.wasm")
119-
.then(response => WebAssembly.instantiateStreaming(response, importObject))
119+
.then(response => response.arrayBuffer())
120+
.then(result => WebAssembly.instantiate(result, importObject))
120121
.then(result => {
121122
shims = register_object(result.module, result.instance);
122123
})

0 commit comments

Comments
 (0)