File tree Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Expand file tree Collapse file tree 3 files changed +4
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import CounterWA from '../build/counter.wasm' ;
2
- import { loadWebAssembly } from './loader' ;
3
2
4
3
export class Counter {
5
4
counterModule ;
@@ -28,9 +27,6 @@ export class Counter {
28
27
'table' : new WebAssembly . Table ( { initial : 0 , element : 'anyfunc' } ) ,
29
28
}
30
29
} ;
31
- loadWebAssembly ( 'wasm/counter.wasm' , importObject ) . then ( instance => {
32
- console . log ( instance ) ;
33
- } ) ;
34
30
this . counterModule = new CounterWA ( importObject ) ;
35
31
console . log ( 'Counter Module' , this . counterModule ) ;
36
32
}
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @deprecated we use .wasm loader now
3
+ */
4
+
1
5
export function loadWebAssembly ( filename , imports = { } ) {
2
6
return fetch ( filename )
3
7
. then ( response => response . arrayBuffer ( ) )
You can’t perform that action at this time.
0 commit comments