maxcountryman_web_sys/features/
gen_SpeechSynthesisUtterance.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = SpeechSynthesisUtterance , typescript_type = "SpeechSynthesisUtterance")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `SpeechSynthesisUtterance` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
13 pub type SpeechSynthesisUtterance;
14 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = text)]
15 #[doc = "Getter for the `text` field of this object."]
16 #[doc = ""]
17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text)"]
18 #[doc = ""]
19 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
20 pub fn text(this: &SpeechSynthesisUtterance) -> String;
21 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = text)]
22 #[doc = "Setter for the `text` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/text)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
27 pub fn set_text(this: &SpeechSynthesisUtterance, value: &str);
28 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = lang)]
29 #[doc = "Getter for the `lang` field of this object."]
30 #[doc = ""]
31 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang)"]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
34 pub fn lang(this: &SpeechSynthesisUtterance) -> String;
35 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = lang)]
36 #[doc = "Setter for the `lang` field of this object."]
37 #[doc = ""]
38 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/lang)"]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
41 pub fn set_lang(this: &SpeechSynthesisUtterance, value: &str);
42 #[cfg(feature = "SpeechSynthesisVoice")]
43 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = voice)]
44 #[doc = "Getter for the `voice` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/voice)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`, `SpeechSynthesisVoice`*"]
49 pub fn voice(this: &SpeechSynthesisUtterance) -> Option<SpeechSynthesisVoice>;
50 #[cfg(feature = "SpeechSynthesisVoice")]
51 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = voice)]
52 #[doc = "Setter for the `voice` field of this object."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/voice)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`, `SpeechSynthesisVoice`*"]
57 pub fn set_voice(this: &SpeechSynthesisUtterance, value: Option<&SpeechSynthesisVoice>);
58 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = volume)]
59 #[doc = "Getter for the `volume` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/volume)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
64 pub fn volume(this: &SpeechSynthesisUtterance) -> f32;
65 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = volume)]
66 #[doc = "Setter for the `volume` field of this object."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/volume)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
71 pub fn set_volume(this: &SpeechSynthesisUtterance, value: f32);
72 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = rate)]
73 #[doc = "Getter for the `rate` field of this object."]
74 #[doc = ""]
75 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/rate)"]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
78 pub fn rate(this: &SpeechSynthesisUtterance) -> f32;
79 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = rate)]
80 #[doc = "Setter for the `rate` field of this object."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/rate)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
85 pub fn set_rate(this: &SpeechSynthesisUtterance, value: f32);
86 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = pitch)]
87 #[doc = "Getter for the `pitch` field of this object."]
88 #[doc = ""]
89 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/pitch)"]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
92 pub fn pitch(this: &SpeechSynthesisUtterance) -> f32;
93 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = pitch)]
94 #[doc = "Setter for the `pitch` field of this object."]
95 #[doc = ""]
96 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/pitch)"]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
99 pub fn set_pitch(this: &SpeechSynthesisUtterance, value: f32);
100 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onstart)]
101 #[doc = "Getter for the `onstart` field of this object."]
102 #[doc = ""]
103 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onstart)"]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
106 pub fn onstart(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
107 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onstart)]
108 #[doc = "Setter for the `onstart` field of this object."]
109 #[doc = ""]
110 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onstart)"]
111 #[doc = ""]
112 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
113 pub fn set_onstart(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
114 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onend)]
115 #[doc = "Getter for the `onend` field of this object."]
116 #[doc = ""]
117 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onend)"]
118 #[doc = ""]
119 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
120 pub fn onend(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
121 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onend)]
122 #[doc = "Setter for the `onend` field of this object."]
123 #[doc = ""]
124 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onend)"]
125 #[doc = ""]
126 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
127 pub fn set_onend(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
128 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onerror)]
129 #[doc = "Getter for the `onerror` field of this object."]
130 #[doc = ""]
131 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onerror)"]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
134 pub fn onerror(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
135 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onerror)]
136 #[doc = "Setter for the `onerror` field of this object."]
137 #[doc = ""]
138 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onerror)"]
139 #[doc = ""]
140 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
141 pub fn set_onerror(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
142 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onpause)]
143 #[doc = "Getter for the `onpause` field of this object."]
144 #[doc = ""]
145 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onpause)"]
146 #[doc = ""]
147 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
148 pub fn onpause(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
149 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onpause)]
150 #[doc = "Setter for the `onpause` field of this object."]
151 #[doc = ""]
152 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onpause)"]
153 #[doc = ""]
154 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
155 pub fn set_onpause(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
156 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onresume)]
157 #[doc = "Getter for the `onresume` field of this object."]
158 #[doc = ""]
159 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onresume)"]
160 #[doc = ""]
161 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
162 pub fn onresume(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
163 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onresume)]
164 #[doc = "Setter for the `onresume` field of this object."]
165 #[doc = ""]
166 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onresume)"]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
169 pub fn set_onresume(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
170 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onmark)]
171 #[doc = "Getter for the `onmark` field of this object."]
172 #[doc = ""]
173 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onmark)"]
174 #[doc = ""]
175 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
176 pub fn onmark(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
177 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onmark)]
178 #[doc = "Setter for the `onmark` field of this object."]
179 #[doc = ""]
180 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onmark)"]
181 #[doc = ""]
182 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
183 pub fn set_onmark(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
184 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisUtterance" , js_name = onboundary)]
185 #[doc = "Getter for the `onboundary` field of this object."]
186 #[doc = ""]
187 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onboundary)"]
188 #[doc = ""]
189 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
190 pub fn onboundary(this: &SpeechSynthesisUtterance) -> Option<::js_sys::Function>;
191 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesisUtterance" , js_name = onboundary)]
192 #[doc = "Setter for the `onboundary` field of this object."]
193 #[doc = ""]
194 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/onboundary)"]
195 #[doc = ""]
196 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
197 pub fn set_onboundary(this: &SpeechSynthesisUtterance, value: Option<&::js_sys::Function>);
198 #[wasm_bindgen(catch, constructor, js_class = "SpeechSynthesisUtterance")]
199 #[doc = "The `new SpeechSynthesisUtterance(..)` constructor, creating a new instance of `SpeechSynthesisUtterance`."]
200 #[doc = ""]
201 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/SpeechSynthesisUtterance)"]
202 #[doc = ""]
203 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
204 pub fn new() -> Result<SpeechSynthesisUtterance, JsValue>;
205 #[wasm_bindgen(catch, constructor, js_class = "SpeechSynthesisUtterance")]
206 #[doc = "The `new SpeechSynthesisUtterance(..)` constructor, creating a new instance of `SpeechSynthesisUtterance`."]
207 #[doc = ""]
208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance/SpeechSynthesisUtterance)"]
209 #[doc = ""]
210 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisUtterance`*"]
211 pub fn new_with_text(text: &str) -> Result<SpeechSynthesisUtterance, JsValue>;
212}