Skip to main content

web_sys/features/
gen_NetworkInformation.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 = "EventTarget",
9        extends = "::js_sys::Object",
10        js_name = "NetworkInformation",
11        typescript_type = "NetworkInformation"
12    )]
13    #[derive(Debug, Clone, PartialEq, Eq)]
14    #[doc = "The `NetworkInformation` class."]
15    #[doc = ""]
16    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation)"]
17    #[doc = ""]
18    #[doc = "*This API requires the following crate features to be activated: `NetworkInformation`*"]
19    pub type NetworkInformation;
20    #[cfg(feature = "ConnectionType")]
21    #[wasm_bindgen(method, getter, js_class = "NetworkInformation", js_name = "type")]
22    #[doc = "Getter for the `type` field of this object."]
23    #[doc = ""]
24    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/type)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `ConnectionType`, `NetworkInformation`*"]
27    pub fn type_(this: &NetworkInformation) -> ConnectionType;
28    #[wasm_bindgen(
29        method,
30        getter,
31        js_class = "NetworkInformation",
32        js_name = "ontypechange"
33    )]
34    #[doc = "Getter for the `ontypechange` field of this object."]
35    #[doc = ""]
36    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/ontypechange)"]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `NetworkInformation`*"]
39    pub fn ontypechange(this: &NetworkInformation) -> Option<::js_sys::Function>;
40    #[wasm_bindgen(
41        method,
42        setter,
43        js_class = "NetworkInformation",
44        js_name = "ontypechange"
45    )]
46    #[doc = "Setter for the `ontypechange` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/ontypechange)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `NetworkInformation`*"]
51    pub fn set_ontypechange(this: &NetworkInformation, value: Option<&::js_sys::Function>);
52}