maxcountryman_web_sys/features/
gen_Geolocation.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (is_type_of = | _ | false , extends = :: js_sys :: Object , js_name = Geolocation , typescript_type = "Geolocation")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `Geolocation` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
13 pub type Geolocation;
14 # [wasm_bindgen (method , structural , js_class = "Geolocation" , js_name = clearWatch)]
15 #[doc = "The `clearWatch()` method."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/clearWatch)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
20 pub fn clear_watch(this: &Geolocation, watch_id: i32);
21 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = getCurrentPosition)]
22 #[doc = "The `getCurrentPosition()` method."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
27 pub fn get_current_position(
28 this: &Geolocation,
29 success_callback: &::js_sys::Function,
30 ) -> Result<(), JsValue>;
31 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = getCurrentPosition)]
32 #[doc = "The `getCurrentPosition()` method."]
33 #[doc = ""]
34 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition)"]
35 #[doc = ""]
36 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
37 pub fn get_current_position_with_error_callback(
38 this: &Geolocation,
39 success_callback: &::js_sys::Function,
40 error_callback: Option<&::js_sys::Function>,
41 ) -> Result<(), JsValue>;
42 #[cfg(feature = "PositionOptions")]
43 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = getCurrentPosition)]
44 #[doc = "The `getCurrentPosition()` method."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `Geolocation`, `PositionOptions`*"]
49 pub fn get_current_position_with_error_callback_and_options(
50 this: &Geolocation,
51 success_callback: &::js_sys::Function,
52 error_callback: Option<&::js_sys::Function>,
53 options: &PositionOptions,
54 ) -> Result<(), JsValue>;
55 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = watchPosition)]
56 #[doc = "The `watchPosition()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
61 pub fn watch_position(
62 this: &Geolocation,
63 success_callback: &::js_sys::Function,
64 ) -> Result<i32, JsValue>;
65 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = watchPosition)]
66 #[doc = "The `watchPosition()` method."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `Geolocation`*"]
71 pub fn watch_position_with_error_callback(
72 this: &Geolocation,
73 success_callback: &::js_sys::Function,
74 error_callback: Option<&::js_sys::Function>,
75 ) -> Result<i32, JsValue>;
76 #[cfg(feature = "PositionOptions")]
77 # [wasm_bindgen (catch , method , structural , js_class = "Geolocation" , js_name = watchPosition)]
78 #[doc = "The `watchPosition()` method."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/watchPosition)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `Geolocation`, `PositionOptions`*"]
83 pub fn watch_position_with_error_callback_and_options(
84 this: &Geolocation,
85 success_callback: &::js_sys::Function,
86 error_callback: Option<&::js_sys::Function>,
87 options: &PositionOptions,
88 ) -> Result<i32, JsValue>;
89}