Alex Crichton b8f080d523 Update idioms of a few examples
* Use `TypedArray::view` now that it exists.
* Don't hack around `instantiateStreaming`
2019-02-19 13:27:30 -08:00

21 lines
689 B
HTML

<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>
</head>
<body>
<!-- this is the JS generated by the `wasm-bindgen` CLI tool -->
<script src='./pkg/no_modules.js'></script>
<script>
window.addEventListener('load', async () => {
// the `wasm_bindgen` global is set to the exports of the Rust module
//
// here we tell bindgen the path to the wasm file so it can run
// initialization and return to us a promise when it's done
// also, we can use 'await' on the returned promise
await wasm_bindgen('./pkg/no_modules_bg.wasm');
});
</script>
</body>
</html>