Skip to main content

web_sys/features/
gen_DeviceProximityEvent.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "Event",
9        extends = "::js_sys::Object",
10        js_name = "DeviceProximityEvent",
11        typescript_type = "DeviceProximityEvent"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `DeviceProximityEvent` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`*"]
19    pub type DeviceProximityEvent;
20    #[wasm_bindgen(method, getter, js_class = "DeviceProximityEvent", js_name = "value")]
21    #[doc = "Getter for the `value` field of this object."]
22    #[doc = ""]
23    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent/value)"]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`*"]
26    pub fn value(this: &DeviceProximityEvent) -> f64;
27    #[wasm_bindgen(method, getter, js_class = "DeviceProximityEvent", js_name = "min")]
28    #[doc = "Getter for the `min` field of this object."]
29    #[doc = ""]
30    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent/min)"]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`*"]
33    pub fn min(this: &DeviceProximityEvent) -> f64;
34    #[wasm_bindgen(method, getter, js_class = "DeviceProximityEvent", js_name = "max")]
35    #[doc = "Getter for the `max` field of this object."]
36    #[doc = ""]
37    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent/max)"]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`*"]
40    pub fn max(this: &DeviceProximityEvent) -> f64;
41    #[wasm_bindgen(catch, constructor, js_class = "DeviceProximityEvent")]
42    #[doc = "The `new DeviceProximityEvent(..)` constructor, creating a new instance of `DeviceProximityEvent`."]
43    #[doc = ""]
44    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent/DeviceProximityEvent)"]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`*"]
47    pub fn new(type_: &str) -> Result<DeviceProximityEvent, JsValue>;
48    #[cfg(feature = "DeviceProximityEventInit")]
49    #[wasm_bindgen(catch, constructor, js_class = "DeviceProximityEvent")]
50    #[doc = "The `new DeviceProximityEvent(..)` constructor, creating a new instance of `DeviceProximityEvent`."]
51    #[doc = ""]
52    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DeviceProximityEvent/DeviceProximityEvent)"]
53    #[doc = ""]
54    #[doc = "*This API requires the following crate features to be activated: `DeviceProximityEvent`, `DeviceProximityEventInit`*"]
55    pub fn new_with_event_init_dict(
56        type_: &str,
57        event_init_dict: &DeviceProximityEventInit,
58    ) -> Result<DeviceProximityEvent, JsValue>;
59}