Add wasm/js/general.odin

This commit is contained in:
gingerBill
2022-05-21 16:37:12 +01:00
parent 1eef9552b4
commit 2895830ce6
2 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ Event :: struct {
user_data: rawptr,
callback: proc(e: Event),
callback: proc(e: Event),
}
@(default_calling_convention="contextless")
+12
View File
@@ -0,0 +1,12 @@
//+build js wasm32, js wasm64
package wasm_js_interface
foreign import "odin_env"
@(default_calling_convention="contextless")
foreign odin_env {
trap :: proc() -> ! ---
abort :: proc() -> ! ---
alert :: proc(msg: string) ---
evaluate :: proc(str: string) ---
}