summaryrefslogtreecommitdiffstats
path: root/vendor/web-sys/src/features/gen_PushManager.rs
blob: cee904a827c55a042e2871467f8e1c9f3035629e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PushManager , typescript_type = "PushManager")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `PushManager` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`*"]
    pub type PushManager;
    # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = getSubscription)]
    #[doc = "The `getSubscription()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/getSubscription)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`*"]
    pub fn get_subscription(this: &PushManager) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = permissionState)]
    #[doc = "The `permissionState()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/permissionState)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`*"]
    pub fn permission_state(this: &PushManager) -> Result<::js_sys::Promise, JsValue>;
    #[cfg(feature = "PushSubscriptionOptionsInit")]
    # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = permissionState)]
    #[doc = "The `permissionState()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/permissionState)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`, `PushSubscriptionOptionsInit`*"]
    pub fn permission_state_with_options(
        this: &PushManager,
        options: &PushSubscriptionOptionsInit,
    ) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = subscribe)]
    #[doc = "The `subscribe()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`*"]
    pub fn subscribe(this: &PushManager) -> Result<::js_sys::Promise, JsValue>;
    #[cfg(feature = "PushSubscriptionOptionsInit")]
    # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = subscribe)]
    #[doc = "The `subscribe()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`, `PushSubscriptionOptionsInit`*"]
    pub fn subscribe_with_options(
        this: &PushManager,
        options: &PushSubscriptionOptionsInit,
    ) -> Result<::js_sys::Promise, JsValue>;
}