summaryrefslogtreecommitdiff
path: root/examples/wasm/index.html
blob: 05e8b29f8cc819e5c1f6881d2716a02eb04ef523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
  <head>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
  </head>
  <body>
    <!-- Note the usage of `type=module` here as this is an ES6 module -->
    <script type="module">
      // Use ES module import syntax to import functionality from the module
      // that we have compiled.
      //
      // Note that the `default` import is an initialization function which
      // will "boot" the module and make it ready to use. Currently browsers
      // don't support natively imported WebAssembly as an ES module, but
      // eventually the manual initialization won't be required!
      import init from './pkg/embassy_wasm_example.js';
      await init();
    </script>
    <h1>Log</h1>
    <div>
        <ul id="log">
        </ul>
    </div>
  </body>
</html>