web_sys/features/
gen_PushManager.rs

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