dom_all_targets.odin 954 B

123456789101112131415161718192021222324252627282930313233343536
  1. #+build !js
  2. package wasm_js_interface
  3. import "base:runtime"
  4. get_element_value_string :: proc "contextless" (id: string, buf: []byte) -> string {
  5. context = runtime.default_context()
  6. panic("vendor:wasm/js not supported on non JS targets")
  7. }
  8. get_element_min_max :: proc "contextless" (id: string) -> (min, max: f64) {
  9. context = runtime.default_context()
  10. panic("vendor:wasm/js not supported on non JS targets")
  11. }
  12. Rect :: struct {
  13. x, y, width, height: f64,
  14. }
  15. get_bounding_client_rect :: proc "contextless" (id: string) -> (rect: Rect) {
  16. context = runtime.default_context()
  17. panic("vendor:wasm/js not supported on non JS targets")
  18. }
  19. window_get_rect :: proc "contextless" () -> (rect: Rect) {
  20. context = runtime.default_context()
  21. panic("vendor:wasm/js not supported on non JS targets")
  22. }
  23. window_get_scroll :: proc "contextless" () -> (x, y: f64) {
  24. context = runtime.default_context()
  25. panic("vendor:wasm/js not supported on non JS targets")
  26. }