web_sys/features/
gen_PermissionStatus.rs1#![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 = "PermissionStatus",
11 typescript_type = "PermissionStatus"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `PermissionStatus` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `PermissionStatus`*"]
19 pub type PermissionStatus;
20 #[cfg(feature = "PermissionState")]
21 #[wasm_bindgen(method, getter, js_class = "PermissionStatus", js_name = "state")]
22 #[doc = "Getter for the `state` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus/state)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `PermissionState`, `PermissionStatus`*"]
27 pub fn state(this: &PermissionStatus) -> PermissionState;
28 #[wasm_bindgen(method, getter, js_class = "PermissionStatus", js_name = "onchange")]
29 #[doc = "Getter for the `onchange` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus/onchange)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `PermissionStatus`*"]
34 pub fn onchange(this: &PermissionStatus) -> Option<::js_sys::Function>;
35 #[wasm_bindgen(method, setter, js_class = "PermissionStatus", js_name = "onchange")]
36 #[doc = "Setter for the `onchange` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PermissionStatus/onchange)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `PermissionStatus`*"]
41 pub fn set_onchange(this: &PermissionStatus, value: Option<&::js_sys::Function>);
42}