aboutsummaryrefslogtreecommitdiff
path: root/core/sys/wasm/js/dom_all_targets.odin
blob: 171deed2f8200260ff94dec4ca36e4d6832d2df0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#+build !js
package wasm_js_interface

import "base:runtime"


get_element_value_string :: proc "contextless" (id: string, buf: []byte) -> string {
	context = runtime.default_context()
	panic("vendor:wasm/js not supported on non JS targets")
}


get_element_min_max :: proc "contextless" (id: string) -> (min, max: f64) {
	context = runtime.default_context()
	panic("vendor:wasm/js not supported on non JS targets")
}


Rect :: struct {
	x, y, width, height: f64,
}

get_bounding_client_rect :: proc "contextless" (id: string) -> (rect: Rect) {
	context = runtime.default_context()
	panic("vendor:wasm/js not supported on non JS targets")
}

window_get_rect :: proc "contextless" () -> (rect: Rect) {
	context = runtime.default_context()
	panic("vendor:wasm/js not supported on non JS targets")
}

window_get_scroll :: proc "contextless" () -> (x, y: f64) {
	context = runtime.default_context()
	panic("vendor:wasm/js not supported on non JS targets")
}