web_sys/features/
gen_SpeechSynthesis.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = SpeechSynthesis , typescript_type = "SpeechSynthesis")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `SpeechSynthesis` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
14 pub type SpeechSynthesis;
15 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesis" , js_name = pending)]
16 #[doc = "Getter for the `pending` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/pending)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
21 pub fn pending(this: &SpeechSynthesis) -> bool;
22 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesis" , js_name = speaking)]
23 #[doc = "Getter for the `speaking` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speaking)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
28 pub fn speaking(this: &SpeechSynthesis) -> bool;
29 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesis" , js_name = paused)]
30 #[doc = "Getter for the `paused` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/paused)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
35 pub fn paused(this: &SpeechSynthesis) -> bool;
36 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesis" , js_name = onvoiceschanged)]
37 #[doc = "Getter for the `onvoiceschanged` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/onvoiceschanged)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
42 pub fn onvoiceschanged(this: &SpeechSynthesis) -> Option<::js_sys::Function>;
43 # [wasm_bindgen (structural , method , setter , js_class = "SpeechSynthesis" , js_name = onvoiceschanged)]
44 #[doc = "Setter for the `onvoiceschanged` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/onvoiceschanged)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
49 pub fn set_onvoiceschanged(this: &SpeechSynthesis, value: Option<&::js_sys::Function>);
50 # [wasm_bindgen (method , structural , js_class = "SpeechSynthesis" , js_name = cancel)]
51 #[doc = "The `cancel()` method."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/cancel)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
56 pub fn cancel(this: &SpeechSynthesis);
57 # [wasm_bindgen (method , structural , js_class = "SpeechSynthesis" , js_name = getVoices)]
58 #[doc = "The `getVoices()` method."]
59 #[doc = ""]
60 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/getVoices)"]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
63 pub fn get_voices(this: &SpeechSynthesis) -> ::js_sys::Array;
64 # [wasm_bindgen (method , structural , js_class = "SpeechSynthesis" , js_name = pause)]
65 #[doc = "The `pause()` method."]
66 #[doc = ""]
67 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/pause)"]
68 #[doc = ""]
69 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
70 pub fn pause(this: &SpeechSynthesis);
71 # [wasm_bindgen (method , structural , js_class = "SpeechSynthesis" , js_name = resume)]
72 #[doc = "The `resume()` method."]
73 #[doc = ""]
74 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/resume)"]
75 #[doc = ""]
76 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`*"]
77 pub fn resume(this: &SpeechSynthesis);
78 #[cfg(feature = "SpeechSynthesisUtterance")]
79 # [wasm_bindgen (method , structural , js_class = "SpeechSynthesis" , js_name = speak)]
80 #[doc = "The `speak()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis/speak)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesis`, `SpeechSynthesisUtterance`*"]
85 pub fn speak(this: &SpeechSynthesis, utterance: &SpeechSynthesisUtterance);
86}