1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PushManager , typescript_type = "PushManager")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `PushManager` class."]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager)"]
13 #[doc = "*This API requires the following crate features to be activated: `PushManager`*"]
15 # [wasm_bindgen (catch , method , structural , js_class = "PushManager" , js_name = getSubscription)]
16 #[doc = "The `getSubscription()` method."]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/getSubscription)"]
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."]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/permissionState)"]
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."]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/permissionState)"]
35 #[doc = "*This API requires the following crate features to be activated: `PushManager`, `PushSubscriptionOptionsInit`*"]
36 pub fn permission_state_with_options(
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."]
43 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe)"]
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."]
51 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe)"]
53 #[doc = "*This API requires the following crate features to be activated: `PushManager`, `PushSubscriptionOptionsInit`*"]
54 pub fn subscribe_with_options(
56 options
: &PushSubscriptionOptionsInit
,
57 ) -> Result
<::js_sys
::Promise
, JsValue
>;