maxcountryman_web_sys/features/
gen_FetchEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = ExtendableEvent , extends = Event , extends = :: js_sys :: Object , js_name = FetchEvent , typescript_type = "FetchEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `FetchEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`*"]
13 pub type FetchEvent;
14 #[cfg(feature = "Request")]
15 # [wasm_bindgen (structural , method , getter , js_class = "FetchEvent" , js_name = request)]
16 #[doc = "Getter for the `request` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`, `Request`*"]
21 pub fn request(this: &FetchEvent) -> Request;
22 # [wasm_bindgen (structural , method , getter , js_class = "FetchEvent" , js_name = clientId)]
23 #[doc = "Getter for the `clientId` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`*"]
28 pub fn client_id(this: &FetchEvent) -> Option<String>;
29 # [wasm_bindgen (structural , method , getter , js_class = "FetchEvent" , js_name = isReload)]
30 #[doc = "Getter for the `isReload` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`*"]
35 pub fn is_reload(this: &FetchEvent) -> bool;
36 #[cfg(feature = "FetchEventInit")]
37 #[wasm_bindgen(catch, constructor, js_class = "FetchEvent")]
38 #[doc = "The `new FetchEvent(..)` constructor, creating a new instance of `FetchEvent`."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/FetchEvent)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`, `FetchEventInit`*"]
43 pub fn new(type_: &str, event_init_dict: &FetchEventInit) -> Result<FetchEvent, JsValue>;
44 # [wasm_bindgen (catch , method , structural , js_class = "FetchEvent" , js_name = respondWith)]
45 #[doc = "The `respondWith()` method."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `FetchEvent`*"]
50 pub fn respond_with(this: &FetchEvent, r: &::js_sys::Promise) -> Result<(), JsValue>;
51}