mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Add wasm/js/general.odin
This commit is contained in:
Vendored
+1
-1
@@ -243,7 +243,7 @@ Event :: struct {
|
|||||||
|
|
||||||
|
|
||||||
user_data: rawptr,
|
user_data: rawptr,
|
||||||
callback: proc(e: Event),
|
callback: proc(e: Event),
|
||||||
}
|
}
|
||||||
|
|
||||||
@(default_calling_convention="contextless")
|
@(default_calling_convention="contextless")
|
||||||
|
|||||||
Vendored
+12
@@ -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) ---
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user