maxcountryman_web_sys/features/
gen_SpeechSynthesisEvent.rs1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = SpeechSynthesisEvent , typescript_type = "SpeechSynthesisEvent")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `SpeechSynthesisEvent` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`*"]
13 pub type SpeechSynthesisEvent;
14 #[cfg(feature = "SpeechSynthesisUtterance")]
15 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisEvent" , js_name = utterance)]
16 #[doc = "Getter for the `utterance` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/utterance)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`, `SpeechSynthesisUtterance`*"]
21 pub fn utterance(this: &SpeechSynthesisEvent) -> SpeechSynthesisUtterance;
22 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisEvent" , js_name = charIndex)]
23 #[doc = "Getter for the `charIndex` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/charIndex)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`*"]
28 pub fn char_index(this: &SpeechSynthesisEvent) -> u32;
29 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisEvent" , js_name = charLength)]
30 #[doc = "Getter for the `charLength` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/charLength)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`*"]
35 pub fn char_length(this: &SpeechSynthesisEvent) -> Option<u32>;
36 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisEvent" , js_name = elapsedTime)]
37 #[doc = "Getter for the `elapsedTime` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/elapsedTime)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`*"]
42 pub fn elapsed_time(this: &SpeechSynthesisEvent) -> f32;
43 # [wasm_bindgen (structural , method , getter , js_class = "SpeechSynthesisEvent" , js_name = name)]
44 #[doc = "Getter for the `name` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/name)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`*"]
49 pub fn name(this: &SpeechSynthesisEvent) -> Option<String>;
50 #[cfg(feature = "SpeechSynthesisEventInit")]
51 #[wasm_bindgen(catch, constructor, js_class = "SpeechSynthesisEvent")]
52 #[doc = "The `new SpeechSynthesisEvent(..)` constructor, creating a new instance of `SpeechSynthesisEvent`."]
53 #[doc = ""]
54 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisEvent/SpeechSynthesisEvent)"]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `SpeechSynthesisEvent`, `SpeechSynthesisEventInit`*"]
57 pub fn new(
58 type_: &str,
59 event_init_dict: &SpeechSynthesisEventInit,
60 ) -> Result<SpeechSynthesisEvent, JsValue>;
61}