web_sys/features/
gen_ServiceWorkerGlobalScope.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = WorkerGlobalScope , extends = EventTarget , extends = :: js_sys :: Object , js_name = ServiceWorkerGlobalScope , typescript_type = "ServiceWorkerGlobalScope")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `ServiceWorkerGlobalScope` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
14    pub type ServiceWorkerGlobalScope;
15    #[cfg(feature = "CookieStore")]
16    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = cookieStore)]
17    #[doc = "Getter for the `cookieStore` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/cookieStore)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `CookieStore`, `ServiceWorkerGlobalScope`*"]
22    pub fn cookie_store(this: &ServiceWorkerGlobalScope) -> CookieStore;
23    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = oncookiechange)]
24    #[doc = "Getter for the `oncookiechange` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oncookiechange)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
29    pub fn oncookiechange(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
30    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = oncookiechange)]
31    #[doc = "Setter for the `oncookiechange` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oncookiechange)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
36    pub fn set_oncookiechange(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
37    #[cfg(feature = "Clients")]
38    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = clients)]
39    #[doc = "Getter for the `clients` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/clients)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `Clients`, `ServiceWorkerGlobalScope`*"]
44    pub fn clients(this: &ServiceWorkerGlobalScope) -> Clients;
45    #[cfg(feature = "ServiceWorkerRegistration")]
46    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = registration)]
47    #[doc = "Getter for the `registration` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/registration)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`, `ServiceWorkerRegistration`*"]
52    pub fn registration(this: &ServiceWorkerGlobalScope) -> ServiceWorkerRegistration;
53    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = oninstall)]
54    #[doc = "Getter for the `oninstall` field of this object."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oninstall)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
59    pub fn oninstall(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
60    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = oninstall)]
61    #[doc = "Setter for the `oninstall` field of this object."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oninstall)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
66    pub fn set_oninstall(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
67    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onactivate)]
68    #[doc = "Getter for the `onactivate` field of this object."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onactivate)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
73    pub fn onactivate(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
74    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onactivate)]
75    #[doc = "Setter for the `onactivate` field of this object."]
76    #[doc = ""]
77    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onactivate)"]
78    #[doc = ""]
79    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
80    pub fn set_onactivate(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
81    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onfetch)]
82    #[doc = "Getter for the `onfetch` field of this object."]
83    #[doc = ""]
84    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onfetch)"]
85    #[doc = ""]
86    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
87    pub fn onfetch(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
88    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onfetch)]
89    #[doc = "Setter for the `onfetch` field of this object."]
90    #[doc = ""]
91    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onfetch)"]
92    #[doc = ""]
93    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
94    pub fn set_onfetch(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
95    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onmessage)]
96    #[doc = "Getter for the `onmessage` field of this object."]
97    #[doc = ""]
98    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onmessage)"]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
101    pub fn onmessage(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
102    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onmessage)]
103    #[doc = "Setter for the `onmessage` field of this object."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onmessage)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
108    pub fn set_onmessage(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
109    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onpush)]
110    #[doc = "Getter for the `onpush` field of this object."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpush)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
115    pub fn onpush(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
116    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onpush)]
117    #[doc = "Setter for the `onpush` field of this object."]
118    #[doc = ""]
119    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpush)"]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
122    pub fn set_onpush(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
123    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onpushsubscriptionchange)]
124    #[doc = "Getter for the `onpushsubscriptionchange` field of this object."]
125    #[doc = ""]
126    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpushsubscriptionchange)"]
127    #[doc = ""]
128    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
129    pub fn onpushsubscriptionchange(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
130    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onpushsubscriptionchange)]
131    #[doc = "Setter for the `onpushsubscriptionchange` field of this object."]
132    #[doc = ""]
133    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpushsubscriptionchange)"]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
136    pub fn set_onpushsubscriptionchange(
137        this: &ServiceWorkerGlobalScope,
138        value: Option<&::js_sys::Function>,
139    );
140    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclick)]
141    #[doc = "Getter for the `onnotificationclick` field of this object."]
142    #[doc = ""]
143    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclick)"]
144    #[doc = ""]
145    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
146    pub fn onnotificationclick(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
147    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclick)]
148    #[doc = "Setter for the `onnotificationclick` field of this object."]
149    #[doc = ""]
150    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclick)"]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
153    pub fn set_onnotificationclick(
154        this: &ServiceWorkerGlobalScope,
155        value: Option<&::js_sys::Function>,
156    );
157    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclose)]
158    #[doc = "Getter for the `onnotificationclose` field of this object."]
159    #[doc = ""]
160    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclose)"]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
163    pub fn onnotificationclose(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
164    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclose)]
165    #[doc = "Setter for the `onnotificationclose` field of this object."]
166    #[doc = ""]
167    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclose)"]
168    #[doc = ""]
169    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
170    pub fn set_onnotificationclose(
171        this: &ServiceWorkerGlobalScope,
172        value: Option<&::js_sys::Function>,
173    );
174    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerGlobalScope" , js_name = skipWaiting)]
175    #[doc = "The `skipWaiting()` method."]
176    #[doc = ""]
177    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting)"]
178    #[doc = ""]
179    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
180    pub fn skip_waiting(this: &ServiceWorkerGlobalScope) -> Result<::js_sys::Promise, JsValue>;
181}