mirror of
https://github.com/Ed94/Odin.git
synced 2026-09-01 14:00:08 +00:00
Update wasm's runtime.js
This commit is contained in:
Vendored
+17
@@ -8,9 +8,15 @@ foreign dom_lib {
|
||||
get_element_value_f64 :: proc(id: string) -> f64 ---
|
||||
set_element_value_f64 :: proc(id: string, value: f64) ---
|
||||
|
||||
get_element_key_f64 :: proc(id: string, key: string) -> f64 ---
|
||||
set_element_key_f64 :: proc(id: string, key: string, value: f64) ---
|
||||
|
||||
set_element_value_string :: proc(id: string, value: string) ---
|
||||
get_element_value_string_length :: proc(id: string) -> int ---
|
||||
|
||||
set_element_key_string :: proc(id: string, key: string, value: string) ---
|
||||
get_element_key_string_length :: proc(id: string, key: string, ) -> int ---
|
||||
|
||||
device_pixel_ratio :: proc() -> f64 ---
|
||||
|
||||
window_set_scroll :: proc(x, y: f64) ---
|
||||
@@ -24,10 +30,21 @@ get_element_value_string :: proc "contextless" (id: string, buf: []byte) -> stri
|
||||
}
|
||||
n := _get_element_value_string(id, buf)
|
||||
return string(buf[:n])
|
||||
}
|
||||
|
||||
get_element_key_string :: proc "contextless" (id: string, key: string, buf: []byte) -> string {
|
||||
@(default_calling_convention="contextless")
|
||||
foreign dom_lib {
|
||||
@(link_name="get_element_key_string")
|
||||
_get_element_key_string :: proc(id: string, key: string, buf: []byte) -> int ---
|
||||
}
|
||||
n := _get_element_key_string(id, key, buf)
|
||||
return string(buf[:n])
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
get_element_min_max :: proc "contextless" (id: string) -> (min, max: f64) {
|
||||
@(default_calling_convention="contextless")
|
||||
foreign dom_lib {
|
||||
|
||||
Reference in New Issue
Block a user