web_sys/features/
gen_FetchEventInit.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = FetchEventInit)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `FetchEventInit` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
12 pub type FetchEventInit;
13 #[doc = "Get the `bubbles` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
16 #[wasm_bindgen(method, getter = "bubbles")]
17 pub fn get_bubbles(this: &FetchEventInit) -> Option<bool>;
18 #[doc = "Change the `bubbles` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
21 #[wasm_bindgen(method, setter = "bubbles")]
22 pub fn set_bubbles(this: &FetchEventInit, val: bool);
23 #[doc = "Get the `cancelable` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
26 #[wasm_bindgen(method, getter = "cancelable")]
27 pub fn get_cancelable(this: &FetchEventInit) -> Option<bool>;
28 #[doc = "Change the `cancelable` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
31 #[wasm_bindgen(method, setter = "cancelable")]
32 pub fn set_cancelable(this: &FetchEventInit, val: bool);
33 #[doc = "Get the `composed` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
36 #[wasm_bindgen(method, getter = "composed")]
37 pub fn get_composed(this: &FetchEventInit) -> Option<bool>;
38 #[doc = "Change the `composed` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
41 #[wasm_bindgen(method, setter = "composed")]
42 pub fn set_composed(this: &FetchEventInit, val: bool);
43 #[doc = "Get the `clientId` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
46 #[wasm_bindgen(method, getter = "clientId")]
47 pub fn get_client_id(this: &FetchEventInit) -> Option<::alloc::string::String>;
48 #[doc = "Change the `clientId` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
51 #[wasm_bindgen(method, setter = "clientId")]
52 pub fn set_client_id(this: &FetchEventInit, val: Option<&str>);
53 #[doc = "Get the `isReload` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
56 #[wasm_bindgen(method, getter = "isReload")]
57 pub fn get_is_reload(this: &FetchEventInit) -> Option<bool>;
58 #[doc = "Change the `isReload` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`*"]
61 #[wasm_bindgen(method, setter = "isReload")]
62 pub fn set_is_reload(this: &FetchEventInit, val: bool);
63 #[cfg(feature = "Request")]
64 #[doc = "Get the `request` field of this object."]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"]
67 #[wasm_bindgen(method, getter = "request")]
68 pub fn get_request(this: &FetchEventInit) -> Request;
69 #[cfg(feature = "Request")]
70 #[doc = "Change the `request` field of this object."]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"]
73 #[wasm_bindgen(method, setter = "request")]
74 pub fn set_request(this: &FetchEventInit, val: &Request);
75}
76impl FetchEventInit {
77 #[cfg(feature = "Request")]
78 #[doc = "Construct a new `FetchEventInit`."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `FetchEventInit`, `Request`*"]
81 pub fn new(request: &Request) -> Self {
82 #[allow(unused_mut)]
83 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
84 ret.set_request(request);
85 ret
86 }
87 #[deprecated = "Use `set_bubbles()` instead."]
88 pub fn bubbles(&mut self, val: bool) -> &mut Self {
89 self.set_bubbles(val);
90 self
91 }
92 #[deprecated = "Use `set_cancelable()` instead."]
93 pub fn cancelable(&mut self, val: bool) -> &mut Self {
94 self.set_cancelable(val);
95 self
96 }
97 #[deprecated = "Use `set_composed()` instead."]
98 pub fn composed(&mut self, val: bool) -> &mut Self {
99 self.set_composed(val);
100 self
101 }
102 #[deprecated = "Use `set_client_id()` instead."]
103 pub fn client_id(&mut self, val: Option<&str>) -> &mut Self {
104 self.set_client_id(val);
105 self
106 }
107 #[deprecated = "Use `set_is_reload()` instead."]
108 pub fn is_reload(&mut self, val: bool) -> &mut Self {
109 self.set_is_reload(val);
110 self
111 }
112 #[cfg(feature = "Request")]
113 #[deprecated = "Use `set_request()` instead."]
114 pub fn request(&mut self, val: &Request) -> &mut Self {
115 self.set_request(val);
116 self
117 }
118}