Skip to main content

web_sys/features/
gen_GeolocationPosition.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    #[wasm_bindgen(
9        extends = "::js_sys::Object",
10        js_name = "GeolocationPosition",
11        typescript_type = "GeolocationPosition"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `GeolocationPosition` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `GeolocationPosition`*"]
19    #[doc = ""]
20    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22    pub type GeolocationPosition;
23    #[cfg(web_sys_unstable_apis)]
24    #[cfg(feature = "GeolocationCoordinates")]
25    #[wasm_bindgen(method, getter, js_class = "GeolocationPosition", js_name = "coords")]
26    #[doc = "Getter for the `coords` field of this object."]
27    #[doc = ""]
28    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition/coords)"]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `GeolocationCoordinates`, `GeolocationPosition`*"]
31    #[doc = ""]
32    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34    pub fn coords(this: &GeolocationPosition) -> GeolocationCoordinates;
35    #[cfg(web_sys_unstable_apis)]
36    #[wasm_bindgen(
37        method,
38        getter,
39        js_class = "GeolocationPosition",
40        js_name = "timestamp"
41    )]
42    #[doc = "Getter for the `timestamp` field of this object."]
43    #[doc = ""]
44    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/GeolocationPosition/timestamp)"]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `GeolocationPosition`*"]
47    #[doc = ""]
48    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
49    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
50    pub fn timestamp(this: &GeolocationPosition) -> f64;
51}