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 = "Clients")]
16    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = clients)]
17    #[doc = "Getter for the `clients` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/clients)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `Clients`, `ServiceWorkerGlobalScope`*"]
22    pub fn clients(this: &ServiceWorkerGlobalScope) -> Clients;
23    #[cfg(feature = "ServiceWorkerRegistration")]
24    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = registration)]
25    #[doc = "Getter for the `registration` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/registration)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`, `ServiceWorkerRegistration`*"]
30    pub fn registration(this: &ServiceWorkerGlobalScope) -> ServiceWorkerRegistration;
31    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = oninstall)]
32    #[doc = "Getter for the `oninstall` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oninstall)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
37    pub fn oninstall(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
38    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = oninstall)]
39    #[doc = "Setter for the `oninstall` field of this object."]
40    #[doc = ""]
41    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/oninstall)"]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
44    pub fn set_oninstall(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
45    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onactivate)]
46    #[doc = "Getter for the `onactivate` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onactivate)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
51    pub fn onactivate(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
52    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onactivate)]
53    #[doc = "Setter for the `onactivate` field of this object."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onactivate)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
58    pub fn set_onactivate(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
59    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onfetch)]
60    #[doc = "Getter for the `onfetch` field of this object."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onfetch)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
65    pub fn onfetch(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
66    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onfetch)]
67    #[doc = "Setter for the `onfetch` field of this object."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onfetch)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
72    pub fn set_onfetch(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
73    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onmessage)]
74    #[doc = "Getter for the `onmessage` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onmessage)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
79    pub fn onmessage(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
80    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onmessage)]
81    #[doc = "Setter for the `onmessage` field of this object."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onmessage)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
86    pub fn set_onmessage(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
87    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onpush)]
88    #[doc = "Getter for the `onpush` field of this object."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpush)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
93    pub fn onpush(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
94    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onpush)]
95    #[doc = "Setter for the `onpush` field of this object."]
96    #[doc = ""]
97    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpush)"]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
100    pub fn set_onpush(this: &ServiceWorkerGlobalScope, value: Option<&::js_sys::Function>);
101    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onpushsubscriptionchange)]
102    #[doc = "Getter for the `onpushsubscriptionchange` field of this object."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpushsubscriptionchange)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
107    pub fn onpushsubscriptionchange(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
108    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onpushsubscriptionchange)]
109    #[doc = "Setter for the `onpushsubscriptionchange` field of this object."]
110    #[doc = ""]
111    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onpushsubscriptionchange)"]
112    #[doc = ""]
113    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
114    pub fn set_onpushsubscriptionchange(
115        this: &ServiceWorkerGlobalScope,
116        value: Option<&::js_sys::Function>,
117    );
118    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclick)]
119    #[doc = "Getter for the `onnotificationclick` field of this object."]
120    #[doc = ""]
121    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclick)"]
122    #[doc = ""]
123    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
124    pub fn onnotificationclick(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
125    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclick)]
126    #[doc = "Setter for the `onnotificationclick` field of this object."]
127    #[doc = ""]
128    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclick)"]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
131    pub fn set_onnotificationclick(
132        this: &ServiceWorkerGlobalScope,
133        value: Option<&::js_sys::Function>,
134    );
135    # [wasm_bindgen (structural , method , getter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclose)]
136    #[doc = "Getter for the `onnotificationclose` field of this object."]
137    #[doc = ""]
138    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclose)"]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
141    pub fn onnotificationclose(this: &ServiceWorkerGlobalScope) -> Option<::js_sys::Function>;
142    # [wasm_bindgen (structural , method , setter , js_class = "ServiceWorkerGlobalScope" , js_name = onnotificationclose)]
143    #[doc = "Setter for the `onnotificationclose` field of this object."]
144    #[doc = ""]
145    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/onnotificationclose)"]
146    #[doc = ""]
147    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
148    pub fn set_onnotificationclose(
149        this: &ServiceWorkerGlobalScope,
150        value: Option<&::js_sys::Function>,
151    );
152    # [wasm_bindgen (catch , method , structural , js_class = "ServiceWorkerGlobalScope" , js_name = skipWaiting)]
153    #[doc = "The `skipWaiting()` method."]
154    #[doc = ""]
155    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope/skipWaiting)"]
156    #[doc = ""]
157    #[doc = "*This API requires the following crate features to be activated: `ServiceWorkerGlobalScope`*"]
158    pub fn skip_waiting(this: &ServiceWorkerGlobalScope) -> Result<::js_sys::Promise, JsValue>;
159}