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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = ServiceWorkerRegistration , typescript_type = "ServiceWorkerRegistration")]
    #[derive(Debug, Clone, PartialEq, Eq)]
    #[doc = "The `ServiceWorkerRegistration` class."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub type ServiceWorkerRegistration;
    #[cfg(feature = "ServiceWorker")]
    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerRegistration" , js_name = installing)]
    #[doc = "Getter for the `installing` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/installing)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorker`, `ServiceWorkerRegistration`*"]
    pub fn installing(this: &ServiceWorkerRegistration) -> Option<ServiceWorker>;
    #[cfg(feature = "ServiceWorker")]
    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerRegistration" , js_name = waiting)]
    #[doc = "Getter for the `waiting` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/waiting)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorker`, `ServiceWorkerRegistration`*"]
    pub fn waiting(this: &ServiceWorkerRegistration) -> Option<ServiceWorker>;
    #[cfg(feature = "ServiceWorker")]
    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerRegistration" , js_name = active)]
    #[doc = "Getter for the `active` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/active)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorker`, `ServiceWorkerRegistration`*"]
    pub fn active(this: &ServiceWorkerRegistration) -> Option<ServiceWorker>;
    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerRegistration" , js_name = scope)]
    #[doc = "Getter for the `scope` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/scope)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn scope(this: &ServiceWorkerRegistration) -> String;
    #[cfg(feature = "ServiceWorkerUpdateViaCache")]
    # [wasm_bindgen (structural , catch , method , getter , js_class = "ServiceWorkerRegistration" , js_name = updateViaCache)]
    #[doc = "Getter for the `updateViaCache` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/updateViaCache)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`, `ServiceWorkerUpdateViaCache`*"]
    pub fn update_via_cache(
        this: &ServiceWorkerRegistration,
    ) -> Result<ServiceWorkerUpdateViaCache, JsValue>;
    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerRegistration" , js_name = onupdatefound)]
    #[doc = "Getter for the `onupdatefound` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/onupdatefound)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn onupdatefound(this: &ServiceWorkerRegistration) -> Option<::js_sys::Function>;
    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerRegistration" , js_name = onupdatefound)]
    #[doc = "Setter for the `onupdatefound` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/onupdatefound)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn set_onupdatefound(this: &ServiceWorkerRegistration, value: Option<&::js_sys::Function>);
    #[cfg(feature = "PushManager")]
    # [wasm_bindgen (structural , catch , method , getter , js_class = "ServiceWorkerRegistration" , js_name = pushManager)]
    #[doc = "Getter for the `pushManager` field of this object."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/pushManager)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `PushManager`, `ServiceWorkerRegistration`*"]
    pub fn push_manager(this: &ServiceWorkerRegistration) -> Result<PushManager, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerRegistration" , js_name = getNotifications)]
    #[doc = "The `getNotifications()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/getNotifications)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn get_notifications(
        this: &ServiceWorkerRegistration,
    ) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerRegistration" , js_name = showNotification)]
    #[doc = "The `showNotification()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn show_notification(
        this: &ServiceWorkerRegistration,
        title: &str,
    ) -> Result<::js_sys::Promise, JsValue>;
    #[cfg(feature = "NotificationOptions")]
    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerRegistration" , js_name = showNotification)]
    #[doc = "The `showNotification()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/showNotification)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `NotificationOptions`, `ServiceWorkerRegistration`*"]
    pub fn show_notification_with_options(
        this: &ServiceWorkerRegistration,
        title: &str,
        options: &NotificationOptions,
    ) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerRegistration" , js_name = unregister)]
    #[doc = "The `unregister()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/unregister)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn unregister(this: &ServiceWorkerRegistration) -> Result<::js_sys::Promise, JsValue>;
    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerRegistration" , js_name = update)]
    #[doc = "The `update()` method."]
    #[doc = ""]
    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/update)"]
    #[doc = ""]
    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerRegistration`*"]
    pub fn update(this: &ServiceWorkerRegistration) -> Result<::js_sys::Promise, JsValue>;
}