move hs2js package here + improve readme

This commit is contained in:
Felix Roos
2024-05-17 10:00:00 +02:00
parent ed506cabb5
commit c232fb7dd5
12 changed files with 1489 additions and 35 deletions
+4 -3
View File
@@ -1,8 +1,9 @@
<script src="https://unpkg.com/hs2js@0.0.3"></script>
<button id="hello">hello</button>
<script>
hs2js.setBase('https://unpkg.com/hs2js@0.0.3/dist/');
document.addEventListener('click', async () => {
window.log = (s) => console.log(s);
await hs2js.evaluate('log "hello from haskell!"');
hs2js.loadParser();
document.getElementById('hello').addEventListener('click', () => {
hs2js.evaluate('alert "hello from haskell!"');
});
</script>