wasm-bindgen/examples/fetch/index.js
Sarah Allen ae6f4a9c87 [WIP] add parameter to async function --> error (#1973)
* add parameter to async function --> error

This change to the fetch example does not compile.
It would be great to include how to do this!

* fn parameter as String
2020-01-22 09:32:47 -06:00

13 lines
402 B
JavaScript

const rust = import('./pkg');
rust
.then(m => {
return m.run("rustwasm/wasm-bindgen").then((data) => {
console.log(data);
console.log("The latest commit to the wasm-bindgen %s branch is:", data.name);
console.log("%s, authored by %s <%s>", data.commit.sha, data.commit.commit.author.name, data.commit.commit.author.email);
})
})
.catch(console.error);