Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
akatsuki105 committed Jan 29, 2024
1 parent 6983090 commit 5f14410
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Binary file modified docs/dugb.wasm
Binary file not shown.
1 change: 0 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

window.addEventListener('message', (e) => {
if (e.origin.includes('localhost')) {
console.log(globalThis.press, e.data);
globalThis.press(e.data);
}
})
Expand Down
9 changes: 6 additions & 3 deletions src/ebi/emu_js.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"fmt"
"syscall/js"
)

Expand All @@ -10,7 +9,11 @@ func init() {
}

func press(this js.Value, args []js.Value) any {
fmt.Println("press", args[0].String())
inputMapWeb[args[0].String()] = true
for key := range inputMapWeb {
if key == args[0].String() {
inputMapWeb[key] = true
break
}
}
return nil
}

0 comments on commit 5f14410

Please sign in to comment.