mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 01:31:34 +00:00
Tweak layout for Chrome
This commit is contained in:
11
examples/hello_world/chrome/index.js
Normal file
11
examples/hello_world/chrome/index.js
Normal file
@ -0,0 +1,11 @@
|
||||
// Note that unlike the directory above this we don't need to use an
|
||||
// asynchronous `import` statement as we're just working with JS here so we can
|
||||
// use normal `import { ... }` statements.
|
||||
//
|
||||
// Unlike before however we have to *also* import the JS file itself containing
|
||||
// wasm (generated by wasm2es6js) which has a `booted` promise to let us know
|
||||
// when it's ready to go.
|
||||
import { greet } from './hello_world';
|
||||
import { booted } from './hello_world_wasm';
|
||||
|
||||
booted.then(() => greet("World!"));
|
Reference in New Issue
Block a user