maxcountryman_web_sys/features/
gen_ServiceWorkerGlobalScope.rs

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