maxcountryman_web_sys/features/
gen_SpeechRecognitionEvent.rs

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