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