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