rust-wasm-playground/www/index.js
2020-10-11 12:17:55 +01:00

16 lines
298 B
JavaScript

import * as wasm from "wazem";
wasm.test_log();
document.getElementById("clickMe").onclick = OnButtonClick;
document.getElementById("minButton").onclick = OnMinClick;
export function OnButtonClick(){
wasm.greet();
}
export function OnMinClick(){
wasm.find_min();
}
export default wasm;