web_sys/features/
gen_SpeechRecognitionEvent.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 = "SpeechRecognitionEvent",
11 typescript_type = "SpeechRecognitionEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `SpeechRecognitionEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`*"]
19 pub type SpeechRecognitionEvent;
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "SpeechRecognitionEvent",
24 js_name = "resultIndex"
25 )]
26 #[doc = "Getter for the `resultIndex` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/resultIndex)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`*"]
31 pub fn result_index(this: &SpeechRecognitionEvent) -> u32;
32 #[cfg(feature = "SpeechRecognitionResultList")]
33 #[wasm_bindgen(
34 method,
35 getter,
36 js_class = "SpeechRecognitionEvent",
37 js_name = "results"
38 )]
39 #[doc = "Getter for the `results` field of this object."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/results)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`, `SpeechRecognitionResultList`*"]
44 pub fn results(this: &SpeechRecognitionEvent) -> Option<SpeechRecognitionResultList>;
45 #[wasm_bindgen(
46 method,
47 getter,
48 js_class = "SpeechRecognitionEvent",
49 js_name = "interpretation"
50 )]
51 #[doc = "Getter for the `interpretation` field of this object."]
52 #[doc = ""]
53 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/interpretation)"]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`*"]
56 pub fn interpretation(this: &SpeechRecognitionEvent) -> ::wasm_bindgen::JsValue;
57 #[cfg(feature = "Document")]
58 #[wasm_bindgen(method, getter, js_class = "SpeechRecognitionEvent", js_name = "emma")]
59 #[doc = "Getter for the `emma` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/emma)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `Document`, `SpeechRecognitionEvent`*"]
64 pub fn emma(this: &SpeechRecognitionEvent) -> Option<Document>;
65 #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionEvent")]
66 #[doc = "The `new SpeechRecognitionEvent(..)` constructor, creating a new instance of `SpeechRecognitionEvent`."]
67 #[doc = ""]
68 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/SpeechRecognitionEvent)"]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`*"]
71 pub fn new(type_: &str) -> Result<SpeechRecognitionEvent, JsValue>;
72 #[cfg(feature = "SpeechRecognitionEventInit")]
73 #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionEvent")]
74 #[doc = "The `new SpeechRecognitionEvent(..)` constructor, creating a new instance of `SpeechRecognitionEvent`."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionEvent/SpeechRecognitionEvent)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionEvent`, `SpeechRecognitionEventInit`*"]
79 pub fn new_with_event_init_dict(
80 type_: &str,
81 event_init_dict: &SpeechRecognitionEventInit,
82 ) -> Result<SpeechRecognitionEvent, JsValue>;
83}