Skip to main content

web_sys/features/
gen_Permissions.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 = "::js_sys::Object",
9        js_name = "Permissions",
10        typescript_type = "Permissions"
11    )]
12    #[derive(Debug, Clone, PartialEq, Eq)]
13    #[doc = "The `Permissions` class."]
14    #[doc = ""]
15    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Permissions)"]
16    #[doc = ""]
17    #[doc = "*This API requires the following crate features to be activated: `Permissions`*"]
18    pub type Permissions;
19    #[wasm_bindgen(catch, method, js_class = "Permissions")]
20    #[doc = "The `query()` method."]
21    #[doc = ""]
22    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query)"]
23    #[doc = ""]
24    #[doc = "*This API requires the following crate features to be activated: `Permissions`*"]
25    pub fn query(
26        this: &Permissions,
27        permission: &::js_sys::Object,
28    ) -> Result<::js_sys::Promise, JsValue>;
29    #[wasm_bindgen(catch, method, js_class = "Permissions")]
30    #[doc = "The `revoke()` method."]
31    #[doc = ""]
32    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/Permissions/revoke)"]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `Permissions`*"]
35    pub fn revoke(
36        this: &Permissions,
37        permission: &::js_sys::Object,
38    ) -> Result<::js_sys::Promise, JsValue>;
39}