maxcountryman_web_sys/features/
gen_SpeechRecognitionError.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 = SpeechRecognitionError , typescript_type = "SpeechRecognitionError")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `SpeechRecognitionError` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
13 pub type SpeechRecognitionError;
14 #[cfg(feature = "SpeechRecognitionErrorCode")]
15 # [wasm_bindgen (structural , method , getter , js_class = "SpeechRecognitionError" , js_name = error)]
16 #[doc = "Getter for the `error` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/error)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`, `SpeechRecognitionErrorCode`*"]
21 pub fn error(this: &SpeechRecognitionError) -> SpeechRecognitionErrorCode;
22 # [wasm_bindgen (structural , method , getter , js_class = "SpeechRecognitionError" , js_name = message)]
23 #[doc = "Getter for the `message` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/message)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
28 pub fn message(this: &SpeechRecognitionError) -> Option<String>;
29 #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionError")]
30 #[doc = "The `new SpeechRecognitionError(..)` constructor, creating a new instance of `SpeechRecognitionError`."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/SpeechRecognitionError)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`*"]
35 pub fn new(type_: &str) -> Result<SpeechRecognitionError, JsValue>;
36 #[cfg(feature = "SpeechRecognitionErrorInit")]
37 #[wasm_bindgen(catch, constructor, js_class = "SpeechRecognitionError")]
38 #[doc = "The `new SpeechRecognitionError(..)` constructor, creating a new instance of `SpeechRecognitionError`."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognitionError/SpeechRecognitionError)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `SpeechRecognitionError`, `SpeechRecognitionErrorInit`*"]
43 pub fn new_with_event_init_dict(
44 type_: &str,
45 event_init_dict: &SpeechRecognitionErrorInit,
46 ) -> Result<SpeechRecognitionError, JsValue>;
47}