mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-14 13:31:22 +00:00
Initial example for the Fetch API
This commit is contained in:
11
examples/fetch/index.js
Normal file
11
examples/fetch/index.js
Normal file
@ -0,0 +1,11 @@
|
||||
const rust = import('./fetch');
|
||||
|
||||
|
||||
rust.then(m => {
|
||||
m.run().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);
|
||||
})
|
||||
});
|
Reference in New Issue
Block a user