rust-wasm-playground/www/index.js

16 lines
298 B
JavaScript
Raw Normal View History

2020-10-10 22:41:31 +01:00
import * as wasm from "wazem";
wasm.test_log();
document.getElementById("clickMe").onclick = OnButtonClick;
2020-10-11 12:17:55 +01:00
document.getElementById("minButton").onclick = OnMinClick;
2020-10-10 22:41:31 +01:00
export function OnButtonClick(){
wasm.greet();
}
2020-10-11 12:17:55 +01:00
export function OnMinClick(){
wasm.find_min();
}
2020-10-10 22:41:31 +01:00
export default wasm;