wasm object interaction test

This commit is contained in:
2026-08-20 00:20:02 +02:00
parent 63c19c3baa
commit c6e8849b28
6 changed files with 41 additions and 3 deletions
+3 -1
View File
@@ -5,7 +5,9 @@
<title>WASM Demo</title>
</head>
<body>
<button id="my-button">Do greet</button>
<button id="my-button">Test Solver</button>
<textarea id="out"></textarea>
<script type="module" src="/src/main.ts"></script>
</body>
+5 -2
View File
@@ -1,7 +1,10 @@
import { greet } from "wordle-solver";
import { Solver } from "wordle-solver";
const button = document.getElementById("my-button")!;
const txt = document.getElementById("out")!;
button.addEventListener("click", () => {
greet();
var s = Solver.new();
txt.innerText = s.stats();
s.free();
});