mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Add wasm/js/general.odin
This commit is contained in:
2
vendor/wasm/js/events.odin
vendored
2
vendor/wasm/js/events.odin
vendored
@@ -243,7 +243,7 @@ Event :: struct {
|
||||
|
||||
|
||||
user_data: rawptr,
|
||||
callback: proc(e: Event),
|
||||
callback: proc(e: Event),
|
||||
}
|
||||
|
||||
@(default_calling_convention="contextless")
|
||||
|
||||
12
vendor/wasm/js/general.odin
vendored
Normal file
12
vendor/wasm/js/general.odin
vendored
Normal 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) ---
|
||||
}
|
||||
Reference in New Issue
Block a user