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