1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "EventTarget",
9 extends = "::js_sys::Object",
10 js_name = "SpeechSynthesisUtterance",
11 typescript_type = "SpeechSynthesisUtterance"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `SpeechSynthesisUtterance` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
19 pub type SpeechSynthesisUtterance;
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "SpeechSynthesisUtterance",
24 js_name = "text"
25 )]
26 #[doc = "Getter for the `text` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
31 pub fn text(this: &SpeechSynthesisUtterance) -> ::alloc::string::String;
32 #[wasm_bindgen(
33 method,
34 setter,
35 js_class = "SpeechSynthesisUtterance",
36 js_name = "text"
37 )]
38 #[doc = "Setter for the `text` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
43 pub fn set_text(this: &SpeechSynthesisUtterance, value: &str);
44 #[wasm_bindgen(
45 method,
46 getter,
47 js_class = "SpeechSynthesisUtterance",
48 js_name = "lang"
49 )]
50 #[doc = "Getter for the `lang` field of this object."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
55 pub fn lang(this: &SpeechSynthesisUtterance) -> ::alloc::string::String;
56 #[wasm_bindgen(
57 method,
58 setter,
59 js_class = "SpeechSynthesisUtterance",
60 js_name = "lang"
61 )]
62 #[doc = "Setter for the `lang` field of this object."]
63 #[doc = ""]
64 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang)"]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
67 pub fn set_lang(this: &SpeechSynthesisUtterance, value: &str);
68 #[cfg(feature = "SpeechSynthesisVoice")]
69 #[wasm_bindgen(
70 method,
71 getter,
72 js_class = "SpeechSynthesisUtterance",
73 js_name = "voice"
74 )]
75 #[doc = "Getter for the `voice` field of this object."]
76 #[doc = ""]
77 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/voice)"]
78 #[doc = ""]
79 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`, `SpeechSynthesisVoice`*"]
80 pub fn voice(this: &SpeechSynthesisUtterance) -> Option<SpeechSynthesisVoice>;
81 #[cfg(feature = "SpeechSynthesisVoice")]
82 #[wasm_bindgen(
83 method,
84 setter,
85 js_class = "SpeechSynthesisUtterance",
86 js_name = "voice"
87 )]
88 #[doc = "Setter for the `voice` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/voice)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`, `SpeechSynthesisVoice`*"]
93 pub fn set_voice(this: &SpeechSynthesisUtterance, value: Option<&SpeechSynthesisVoice>);
94 #[wasm_bindgen(
95 method,
96 getter,
97 js_class = "SpeechSynthesisUtterance",
98 js_name = "volume"
99 )]
100 #[doc = "Getter for the `volume` field of this object."]
101 #[doc = ""]
102 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/volume)"]
103 #[doc = ""]
104 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
105 pub fn volume(this: &SpeechSynthesisUtterance) -> f32;
106 #[wasm_bindgen(
107 method,
108 setter,
109 js_class = "SpeechSynthesisUtterance",
110 js_name = "volume"
111 )]
112 #[doc = "Setter for the `volume` field of this object."]
113 #[doc = ""]
114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/volume)"]
115 #[doc = ""]
116 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
117 pub fn set_volume(this: &SpeechSynthesisUtterance, value: f32);
118 #[wasm_bindgen(
119 method,
120 getter,
121 js_class = "SpeechSynthesisUtterance",
122 js_name = "rate"
123 )]
124 #[doc = "Getter for the `rate` field of this object."]
125 #[doc = ""]
126 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/rate)"]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
129 pub fn rate(this: &SpeechSynthesisUtterance) -> f32;
130 #[wasm_bindgen(
131 method,
132 setter,
133 js_class = "SpeechSynthesisUtterance",
134 js_name = "rate"
135 )]
136 #[doc = "Setter for the `rate` field of this object."]
137 #[doc = ""]
138 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/rate)"]
139 #[doc = ""]
140 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
141 pub fn set_rate(this: &SpeechSynthesisUtterance, value: f32);
142 #[wasm_bindgen(
143 method,
144 getter,
145 js_class = "SpeechSynthesisUtterance",
146 js_name = "pitch"
147 )]
148 #[doc = "Getter for the `pitch` field of this object."]
149 #[doc = ""]
150 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/pitch)"]
151 #[doc = ""]
152 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
153 pub fn pitch(this: &SpeechSynthesisUtterance) -> f32;
154 #[wasm_bindgen(
155 method,
156 setter,
157 js_class = "SpeechSynthesisUtterance",
158 js_name = "pitch"
159 )]
160 #[doc = "Setter for the `pitch` field of this object."]
161 #[doc = ""]
162 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/pitch)"]
163 #[doc = ""]
164 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
165 pub fn set_pitch(this: &SpeechSynthesisUtterance, value: f32);
166 #[wasm_bindgen(
167 method,
168 getter,
169 js_class = "SpeechSynthesisUtterance",
170 js_name = "onstart"
171 )]
172 #[doc = "Getter for the `onstart` field of this object."]
173 #[doc = ""]
174 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onstart)"]
175 #[doc = ""]
176 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
177 pub fn onstart(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
178 #[wasm_bindgen(
179 method,
180 setter,
181 js_class = "SpeechSynthesisUtterance",
182 js_name = "onstart"
183 )]
184 #[doc = "Setter for the `onstart` field of this object."]
185 #[doc = ""]
186 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onstart)"]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
189 pub fn set_onstart(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
190 #[wasm_bindgen(
191 method,
192 getter,
193 js_class = "SpeechSynthesisUtterance",
194 js_name = "onend"
195 )]
196 #[doc = "Getter for the `onend` field of this object."]
197 #[doc = ""]
198 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onend)"]
199 #[doc = ""]
200 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
201 pub fn onend(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
202 #[wasm_bindgen(
203 method,
204 setter,
205 js_class = "SpeechSynthesisUtterance",
206 js_name = "onend"
207 )]
208 #[doc = "Setter for the `onend` field of this object."]
209 #[doc = ""]
210 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onend)"]
211 #[doc = ""]
212 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
213 pub fn set_onend(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
214 #[wasm_bindgen(
215 method,
216 getter,
217 js_class = "SpeechSynthesisUtterance",
218 js_name = "onerror"
219 )]
220 #[doc = "Getter for the `onerror` field of this object."]
221 #[doc = ""]
222 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onerror)"]
223 #[doc = ""]
224 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
225 pub fn onerror(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
226 #[wasm_bindgen(
227 method,
228 setter,
229 js_class = "SpeechSynthesisUtterance",
230 js_name = "onerror"
231 )]
232 #[doc = "Setter for the `onerror` field of this object."]
233 #[doc = ""]
234 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onerror)"]
235 #[doc = ""]
236 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
237 pub fn set_onerror(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
238 #[wasm_bindgen(
239 method,
240 getter,
241 js_class = "SpeechSynthesisUtterance",
242 js_name = "onpause"
243 )]
244 #[doc = "Getter for the `onpause` field of this object."]
245 #[doc = ""]
246 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onpause)"]
247 #[doc = ""]
248 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
249 pub fn onpause(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
250 #[wasm_bindgen(
251 method,
252 setter,
253 js_class = "SpeechSynthesisUtterance",
254 js_name = "onpause"
255 )]
256 #[doc = "Setter for the `onpause` field of this object."]
257 #[doc = ""]
258 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onpause)"]
259 #[doc = ""]
260 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
261 pub fn set_onpause(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
262 #[wasm_bindgen(
263 method,
264 getter,
265 js_class = "SpeechSynthesisUtterance",
266 js_name = "onresume"
267 )]
268 #[doc = "Getter for the `onresume` field of this object."]
269 #[doc = ""]
270 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onresume)"]
271 #[doc = ""]
272 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
273 pub fn onresume(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
274 #[wasm_bindgen(
275 method,
276 setter,
277 js_class = "SpeechSynthesisUtterance",
278 js_name = "onresume"
279 )]
280 #[doc = "Setter for the `onresume` field of this object."]
281 #[doc = ""]
282 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onresume)"]
283 #[doc = ""]
284 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
285 pub fn set_onresume(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
286 #[wasm_bindgen(
287 method,
288 getter,
289 js_class = "SpeechSynthesisUtterance",
290 js_name = "onmark"
291 )]
292 #[doc = "Getter for the `onmark` field of this object."]
293 #[doc = ""]
294 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onmark)"]
295 #[doc = ""]
296 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
297 pub fn onmark(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
298 #[wasm_bindgen(
299 method,
300 setter,
301 js_class = "SpeechSynthesisUtterance",
302 js_name = "onmark"
303 )]
304 #[doc = "Setter for the `onmark` field of this object."]
305 #[doc = ""]
306 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onmark)"]
307 #[doc = ""]
308 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
309 pub fn set_onmark(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
310 #[wasm_bindgen(
311 method,
312 getter,
313 js_class = "SpeechSynthesisUtterance",
314 js_name = "onboundary"
315 )]
316 #[doc = "Getter for the `onboundary` field of this object."]
317 #[doc = ""]
318 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onboundary)"]
319 #[doc = ""]
320 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
321 pub fn onboundary(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
322 #[wasm_bindgen(
323 method,
324 setter,
325 js_class = "SpeechSynthesisUtterance",
326 js_name = "onboundary"
327 )]
328 #[doc = "Setter for the `onboundary` field of this object."]
329 #[doc = ""]
330 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onboundary)"]
331 #[doc = ""]
332 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
333 pub fn set_onboundary(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
334 #[wasm_bindgen(catch, constructor, js_class = "SpeechSynthesisUtterance")]
335 #[doc = "The `new SpeechSynthesisUtterance(..)` constructor, creating a new instance of `SpeechSynthesisUtterance`."]
336 #[doc = ""]
337 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/SpeechSynthesisUtterance)"]
338 #[doc = ""]
339 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
340 pub fn new() -> Result<SpeechSynthesisUtterance, JsValue>;
341 #[wasm_bindgen(catch, constructor, js_class = "SpeechSynthesisUtterance")]
342 #[doc = "The `new SpeechSynthesisUtterance(..)` constructor, creating a new instance of `SpeechSynthesisUtterance`."]
343 #[doc = ""]
344 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/SpeechSynthesisUtterance)"]
345 #[doc = ""]
346 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
347 pub fn new_with_text(text: &str) -> Result<SpeechSynthesisUtterance, JsValue>;
348}