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